Crystal: Suggestion: port gem mimemagic from Ruby for significant MIME type coverage

Created on 28 Jun 2019  路  2Comments  路  Source: crystal-lang/crystal

I notice the unix and windows mime code is rather skeletal and incomplete. I want to suggest you simply port the mimemagic gem from Ruby to save time. It is very comprehensive in its coverage of mime types, has a byte-stream recognizer, and does filename extension recognition as well. In my Ruby code I have come to rely upon it and it has helped a lot.

Cheers,

G. Gibson

shard-idea

Most helpful comment

There has been some work on mime types and I can try to summarize it. The stdlib should be using mime types on the host operating system and as a community we should probably have a shard that covers more mime types.

Have you see the crystal-community repo? I would open an issue there and see if anyone is interested in helping you build out a mime library.

All 2 comments

There has been some work on mime types and I can try to summarize it. The stdlib should be using mime types on the host operating system and as a community we should probably have a shard that covers more mime types.

Have you see the crystal-community repo? I would open an issue there and see if anyone is interested in helping you build out a mime library.

I don't think we're going to add more complexity to the MIME class. It already does filename extension recognition. Byte-stream recognition can easily be added by an external shard.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oprypin picture oprypin  路  3Comments

ArthurZ picture ArthurZ  路  3Comments

grosser picture grosser  路  3Comments

pbrusco picture pbrusco  路  3Comments

nabeelomer picture nabeelomer  路  3Comments