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: use file extension if filetype fails with PDF #827

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

ceberam
Copy link
Contributor

@ceberam ceberam commented Jan 28, 2025

filetype library may not identify some files as PDF, for instance https://github.com/user-attachments/files/18533486/WMOOS6EVZZXGYSVQPP7UORUTNEUEBO3Q.pdf.
As a simple solution, we can leverage _DocumentConversionInput._mime_from_extension function and the file extension, following the current pattern with other MIME types.

Resolves #798

Checklist:

  • Documentation has been updated, if necessary.
  • Examples have been added, if necessary.
  • Tests have been added, if necessary.

Filetype library may not identify some files as PDF. Leverage the file extension
as a simple solution.

Signed-off-by: Cesar Berrospi Ramis <[email protected]>
@ceberam ceberam self-assigned this Jan 28, 2025
Copy link

mergify bot commented Jan 28, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@dolfim-ibm dolfim-ibm merged commit adf6353 into main Jan 28, 2025
9 checks passed
@dolfim-ibm dolfim-ibm deleted the fix/pdf-detection branch January 28, 2025 18:03
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.

Issue with PDF type detection
3 participants