magic-mime
Convert file extensions to MIME types
Description
This library contains a database of MIME types that maps filename extensions
into MIME types suitable for use in many Internet protocols such as HTTP or
e-mail. It is generated from the mime.types
file found in Unix systems, but
has no dependency on a filesystem since it includes the contents of the
database as an ML datastructure.
For example, here's how to lookup MIME types in the [utop] REPL:
#require "magic-mime";;
Magic_mime.lookup "/foo/bar.txt";;
- : bytes = "text/plain"
Magic_mime.lookup "bar.css";;
- : bytes = "text/css"
More information:
Install
copied = false, 2000)"
:class="{ 'border-gray-700': !copied, 'text-gray-100': !copied, 'focus:ring-orange-500': !copied, 'focus:border-orange-500': !copied, 'border-green-600': copied, 'text-green-600': copied, 'focus:ring-green-500': copied, 'focus:border-green-500': copied }">
- Published
- 08 Feb 2015
- Authors
- Maintainers
Sources
Dependencies
Reverse Dependencies
cohttp
>= "0.16.0" & < "1.0.0"
cohttp-lwt-unix
>= "1.0.0"
cowabloga
>= "0.1.0"
email_message
>= "113.00.00"
mirage-http
>= "3.1.0"
ojs-base
>= "0.3.0"
opium
>= "0.13.1"