Handle .docx, .xlsx, and .pptx with extra magic
The freedesktop magic doesn't work for the Office 2007+ files, it detects them all as application/zip. I have magic which detects them, but it requires looking at 2,000 byte ranges, too much for their project (which has to support things like file browsers). Since you already warn that `by_magic` is slow, it'd be nice to support it here at least. This would allow the paperclip project to use mimemagic and stop relying on the `file` binary: - https://github.com/thoughtbot/paperclip/issues/1530#issuecomment-43375497 Support is enabled through an overlay, required with require 'mimemagic/overlay' Documentation is in the README
Showing
lib/mimemagic/overlay.rb
0 → 100644
File added
Please
register
or
sign in
to comment