Skip to content
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

fix: pdf attachment preview fixed. #2386

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alizaib1217
Copy link
Contributor

Description:

Attachment handling in the Analysis module, specifically for PDFs. It ensures proper retrieval and display of attached files by adding support for PDF attachments and allowing Blob URLs for fetching data from the backend. Additionally, it fixes MIME type assignment to ensure the correct content type is set for Blob URLs. These changes prevent incorrect file handling and ensure that only PDFs are displayed when previewing files, avoiding unintended text rendering. With these improvements, users can now seamlessly fetch, preview, and interact with attachments without issues.


  • rather 1-story 1-commit than sub-atomic commits

  • commit title is meaningful => git history search

  • commit description is helpful => helps the reviewer to understand the changes

  • code is up-to-date with the latest developments of the target branch (rebased to it or whatever) => ⏩-merge for linear history is favoured

  • added code is linted

  • tests are passing (at least locally): we still have some random test failure on CI. thinking of asking spec/examples.txt to be commited

  • in case the changes are visible to the end-user,  video or screenshots should be added to the PR => helps with user testing

  • testing coverage improvement is improved.

  • CHANGELOG :  add a bullet point on top (optional: reference to github issue/PR )

  • parallele PR for documentation  on docusaurus  if the feature/fix is tagged for a release

@alizaib1217 alizaib1217 requested a review from PiTrem March 12, 2025 12:44
@@ -226,9 +226,9 @@ def remove_duplicated(att)

desc 'get_annotated_image_of_attachment'
get ':attachment_id/annotated_image' do
content_type 'application/octet-stream'
file_type = @attachment.annotated_filename.present? ? MIME::Types.type_for(@attachment.annotated_filename).first.to_s : MIME::Types.type_for(@attachment.filename).first.to_s

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/LineLength: Line is too long. [181/120]

Copy link

LCOV of commit 3d94d51 during Continuous Integration #4635

Summary coverage rate:
  lines......: 67.0% (15496 of 23139 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

@PiTrem PiTrem changed the title bugfix: pdf attachment preview fixed. fix: pdf attachment preview fixed. Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant