mimemagicrb / mimemagic

Mime type detection in ruby via file extension or file content
https://github.com/mimemagicrb/mimemagic
MIT License
417 stars 441 forks source link

Consider using an MIT licensed mime db? #144

Open patsplat opened 3 years ago

patsplat commented 3 years ago

Is there a reason against using an MIT licensed json db from mime-db, rather than continuing to use the GPL free desktop mime db?

https://github.com/jshttp/mime-db

Using a compatible license should allow the derivative file to be distributed, and remove the need for environment variables etc.

Would such a PR be welcome?

patsplat commented 3 years ago

mime-db provides the extensions but not the magic

the magic needs to come from another source, perhaps http://www.darwinsys.com/file/

animeavi commented 3 years ago

Marcel used Apache Tika as the source of the DB (and used code from this gem to parse it) https://github.com/rails/marcel/commit/2e58d1986715420f0abbba060b6e158d6f4d3a05