rails / marcel

Find the mime type of files, examining file, filename and declared type
Apache License 2.0
386 stars 67 forks source link

Fix Illustrator detection as application/pdf instead of application/illustrator #94

Closed jeremy closed 9 months ago

jeremy commented 1 year ago

Given an .ai file with an application/postscript declared type, the filename extension would be ignored as a potential subtype of the application/pdf magic-byte-detected type.

Fix by evaluating all candidate types rather than a single fallback.

zzak commented 9 months ago

I just happened to see this today: carrierwaveuploader/carrierwave#2704