Skip to content

dynamo/mime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages