-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only part that is still unclear to me is where the conversionSourceFileId is set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?