Skip to content

[CCAP-629][CCAP-575] Support for converting documents and images to pdfs #645

Merged
cram-cfa merged 33 commits intomainfrom
marc-CCAP-629
Feb 5, 2025
Merged

[CCAP-629][CCAP-575] Support for converting documents and images to pdfs #645
cram-cfa merged 33 commits intomainfrom
marc-CCAP-629

Conversation

@cram-cfa
Copy link
Copy Markdown
Collaborator

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

  • Does the new code follow our preferred coding
    style
    ?
  • Does the code include javadocs, where necessary?
  • Have tests for this feature been added / updated?
  • Has the readme been updated?

@cram-cfa cram-cfa changed the title [CCAP-629] Support for converting images to pdfs DO NOT MERGE: [CCAP-629] Support for converting images to pdfs Jan 29, 2025
@cram-cfa cram-cfa changed the title DO NOT MERGE: [CCAP-629] Support for converting images to pdfs DO NOT MERGE: [CCAP-629][CCAP-575] Support for converting documents and images to pdfs Jan 31, 2025
.conversionSourceFileId(userFileId)
.build();

uploadedConvertedFile = userFileRepositoryService.save(uploadedConvertedFile);
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Collaborator Author

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!

@cram-cfa cram-cfa changed the title DO NOT MERGE: [CCAP-629][CCAP-575] Support for converting documents and images to pdfs [CCAP-629][CCAP-575] Support for converting documents and images to pdfs Feb 3, 2025
@spokenbird spokenbird self-requested a review February 5, 2025 22:29
@cram-cfa cram-cfa merged commit 6eb8607 into main Feb 5, 2025
3 checks passed
@cram-cfa cram-cfa deleted the marc-CCAP-629 branch February 5, 2025 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants