josevalim

josevalim

Creator of Elixir

Help testing Mime latest (upcoming v2)

Hi everyone,

I have started working on the v2 version of the Mime library, used by Plug and Phoenix. The previous version depended on an external Mime database, which made it complicated for us to handle corner cases and, often times, it was too large.

The new version starts a new database from scratch, which should be faster to compile, faster to run, and use less memory. However, it may be missing important mime types. Therefore, I would like to request the community help in two possible ways:

  1. Compare the list of supported extensions with the files you have in priv/static (or assets/static). Are all extensions listed? If not, please send a PR to add unsupported extensions.

  2. Use mime master as a dependency in your project and see if anything fails:

     {:mime, "~> 2.0", github: "elixir-plug/mime", override: true}
    

Your feedback is deeply appreciated!

Most Liked

halostatue

halostatue

Hey, José

I still think that using an external database is generally a good choice, even if it is something that is only manually updated and may generate a file that can be parsed during compile.

I maintain mime-types-data, and I’m happy to update the code there to generate something that is both smaller and easier to work with but more comprehensive than the ~76 types that I see now. (It’s pretty easy to filter the data so that only items with extensions are included (still probably larger than expected as there are 1,198 extensions known to the complete database and 824 extensions attached to 864 IANA registered types).

josevalim

josevalim

Creator of Elixir

There is a mechanism for you to define additional types. I think you will need to define each version as its own mime type.

josevalim

josevalim

Creator of Elixir

Thank you! Note the warning is fixed on more recent plug versions.

josevalim

josevalim

Creator of Elixir

Thanks for the follow up and don’t worry about this. :slight_smile: Get better!

josevalim

josevalim

Creator of Elixir

Just to be sure: did you force MIME to be recompiled so it picks your changes?

Where Next?

Popular in Libraries Top

RobertDober
Earmark is a pure-Elixir Markdown converter. It is intended to be used as a library (just call Earmark.as_html), but can also be used as...
239 11851 134
New
marcuslankenau
I feel kind of stuck with the absence of a proper xml library for Elixir. Currently I use SweetXML which was ok for me more or less to pa...
New
mathieuprog
Hello :wave: Allow me to introduce you to Tz, an alternative time zone database support to Tzdata. Why another library? First and fore...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
Crowdhailer
I have been updating a library that allows you to pipe between functions that use the erlang result tuple convention. Assuming you have...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
alisinabh
Hey everyone i’ve developed a library for Jalaali calendar for elixir which supports converting Gregorian dates to Jalaali and vice vers...
New
tmbb
PhoenixWS - Websockets over Phoenix Channels Source code on Github here: https://github.com/tmbb/phoenix_ws Phoenix channels are a great...
New
Qqwy
While not as prevalent as in imperative languages, arrays (collections with efficient random element access) are still very useful in Eli...
New
maltoe
Hello! Came here to announce ChromicPDF, a pet project PDF generator I’ve been working on for the past few months. Why another PDF gener...
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

Sub Categories:

We're in Beta

About us Mission Statement