MIME Types v0.1.1 MIME.Types
Builds a MIME type registry with common and custom types.
To create your own MIME type registry:
defmodule Mr.MIME do
use MIME.Types, %{
"application/vnd.api+json" => ["json-api"]
}
end
This will build a registry of MIME types under mapping/0
,
and lists types/0
and extensions/0
for checking inclusion.
If you change the custom mapping passed into the macro, your module will need to be recompiled.