Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 665 Bytes

README.md

File metadata and controls

28 lines (20 loc) · 665 Bytes

MIME

A simple Elixir library that maps MIME types to file extensions and vice versa.

Usage

iex> Mime.Types.type("json")
"application/json"
iex> Mime.Types.extensions("application/json")
["json"]
iex> Mime.Types.path("fixtures/users.json")
"application/json"

mime.types

This module uses the public domain mime.types file from the Mailcap project. The file is parsed during compilation time and embedded directly into the module.

TODO

  • MIME.Magic based on Apache httpd's magic file.