Prefer the mimemagic gem for content type detection
Prioritize MimeMagic over the `file` binary for content type detection when it finds a match. Fall back to `file` if MimeMagic can't match anything. `file` incorrectly detects Open Office XML files (e.g., xlsx, docx) as zip since they're implemented as zipped archives of xml files. MimeMagic detects them properly.
Showing
... | ... | @@ -24,6 +24,7 @@ Gem::Specification.new do |s| |
s.add_dependency('activesupport', '>= 3.0.0') | ||
s.add_dependency('cocaine', '~> 0.5.5') | ||
s.add_dependency('mime-types') | ||
s.add_dependency('mimemagic', '0.3.0') | ||
s.add_development_dependency('activerecord', '>= 3.0.0') | ||
s.add_development_dependency('shoulda') | ||
... | ... |
spec/support/fixtures/empty.xlsx
0 → 100644
File added
Please
register
or
sign in
to comment