marcel
marcel copied to clipboard
Find the mime type of files, examining file, filename and declared type
Hello, I use version 1.0.4 with carriewave, the file is csv with BOM, but it detected content_type `text/plain` see below screenshot, the first file is csv, it detected as text/csv...
AV1 video in webm should be classified as `video/webm`, but current it recognized as `audio/webm`. See https://github.com/mastodon/mastodon/issues/19734
If the HTML has a comment before the opening tag, it is incorrectly identified as XML. ### Steps to reproduce ```ruby io = StringIO.new(
Hi @jeremy 👋 I just updated `marcel` and noticed some failing specs on our side. After some investigation I saw that SVGs with a title did not had the context...
* MIME type aliases are now supported. * Aliases are resolved to their canonical type in all APIs. * Introduce `MimeType.canonicalize type, instead_of: old` to override a Tika canonical type...
Hi team, Thanks for migrating this gem to use Tika and replaced mimemagic gem, we're using the latest gem version on production and so far so good, great work, thank...
### Issue If html file contains svg tag Marcel will detect "image/svg+xml" type. This causes some problems with the browser, it says: "This page contains the following errors:" ### Investigation...
### Steps to reproduce Download a JXL ( EG from [here](https://jpegxl.info/logo.jxl) ) Run `Marcel::MimeType.for Pathname.new('logo.jxl')` or `Marcel::MimeType.for(File.read('logo.jxl'))` ### Expected result The correct mime type is 'image/jxl' ### Actual behaviour The...
Like pkcs12, add support for pkcs8 (.p8 extension) files. https://www.misterpki.com/pkcs8/ Marcel returns this mime type, but [active_storage_validation](https://github.com/igorkasyanchuk/active_storage_validations) not pass the validation. ```sh Marcel::MimeType.for Pathname.new("key.p8") # "application/x-x509-key;format=pem" ``` ```rb validates :my_file,...
The previous Marcel version that used `Mimemagic` had a different behavior then version 1.0 that uses `Tika`. It seems that the mime type for XLIFF changed after spec version 2.0,...