Remove BakedFile#mime_type#22
Conversation
8c9fe9c to
23a7acf
Compare
|
MIME type resolution should not need to be implemented multiple times but in a generic, reusable way. That's why this shouldn't be included in this shard. There is an issue to bring a MIME registry to Crystal's stdlib and I've been working on that, but it's not ready yet. There are some shards available with a MIME registry, they can be used to resolve the MIME type at runtime. Depending on a system command at compile time is not a great idea because this would mean you need a properly configured registry on the build system if you don't want to face MIME type issues at runtime. That's just impractical. Shelling out to use a system tool is also not optimal, this should also be handled inside crystal. |
|
@straight-shoota |
|
Let's wait for crystal-lang/crystal#5765. Should hopefully go in the next release. |
23a7acf to
a661859
Compare
|
The MIME registry was finally released in Crystal 0.27.1, so this PR can now be merged. Instead of |
|
@straight-shoota awesome 👍 |
Closes #17