[CCAP-629][CCAP-575] Support for converting documents and images to pdfs #645
[CCAP-629][CCAP-575] Support for converting documents and images to pdfs #645
Conversation
5eb9633 to
3cc5df8
Compare
3cc5df8 to
a1bdb81
Compare
| .conversionSourceFileId(userFileId) | ||
| .build(); | ||
|
|
||
| uploadedConvertedFile = userFileRepositoryService.save(uploadedConvertedFile); |
There was a problem hiding this comment.
The only part that is still unclear to me is where the conversionSourceFileId is set.
There was a problem hiding this comment.
This is generated on line 191; It is the UUID of the entry for the file that was uploaded by the user. It has to be generated in the code -- and not by the database -- so we can properly set the path on the uploaded file. (This was actually a bug before, but since we don't really care what the path is, as long as it's set... it's not actually causing any issues in production, etc)
Once the uploaded file has a UUID, we want the new converted file to have a reference back to that uploaded file -- hence it being the "conversion source file's id".
The code to create the UUID previously was way up at the top of the method, I just moved it to line 191 where it is first ever needed.
Let me know if that explains it!
Issue tracking number 🔗
https://codeforamerica.atlassian.net/browse/CCAP-629
Description of change ✍️
Priority 🥇
Effect on other applications using FFB 🌊
Testing
✅ Checklist before requesting a review
style?