Reputation: 96767
I tried using mimetype-fu to detect mimetypes, but it seems to work for some files, while for others it doesn't. For example, I downloaded this R manual, and I tried to detect it's mimetype, via:
File.mime_type?(File.read("R-intro.pdf"))
and it tells me that the mimetype is "unknown/unknown"
. Is there another way of detecting mimetypes? Is there maybe another mimetype-fu option that I'm not aware of, that could handle this case?
Upvotes: 1
Views: 289