file-type: PDF created with Adobe Illustrator are wrongly detected as .ai files
Since #323 (src: Add support for AI files (Adobe Illustrator)), file-type
looks for the text “Adobe Illustrator
” in PDF documents and if it matches, it assumes it’s an adobe .ai
file.
It seems that normal PDF created with Adobe Illustrator will contain the text “Adobe Illustrator
” quite a few times in the metadata too, even though they are not Adobe Illustrator files.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (7 by maintainers)
We’ve also encountered this same regression. We rely on the PDF detection functionality to validate specific PDF processing requests but as of
file-type@14.1.0
this process breaks as file-type returns the files as.ai
(application/postscript
).Is there a solution in mind here? I’d suggest it’s more of a ‘bug’ than an ‘enhancement’ as it is falsely identifying one file type as another.
For now, we’ve pinned to
14.0.0
until this is resolved. We’ll also look at submitting a PR if we can determine a nice fix on our side.