mimemap: Tables for mapping filename extensions to MIME types

Description Source Examples

Description

The data mimemap is a named character vector that stores the filename extensions and the corresponding MIME types, e.g. c(html = 'text/html', pdf = 'application/pdf', ...). The character vector mimeextra stores some additional types that we know, such as Markdown files (‘.md’), or R scripts (‘.R’).

Source

The file ‘/etc/mime.types’ on Debian.

Examples

1
2
3
4
5
str(as.list(mimemap))
mimemap["pdf"]
mimemap[c("html", "js", "css")]
# additional MIME types (not exported)
mime:::mimeextra

Example output

List of 545
 $ ez         : chr "application/andrew-inset"
 $ anx        : chr "application/annodex"
 $ atom       : chr "application/atom+xml"
 $ atomcat    : chr "application/atomcat+xml"
 $ atomsrv    : chr "application/atomserv+xml"
 $ lin        : chr "application/bbolin"
 $ cu         : chr "application/cu-seeme"
 $ davmount   : chr "application/davmount+xml"
 $ dcm        : chr "application/dicom"
 $ tsp        : chr "application/dsptype"
 $ es         : chr "application/ecmascript"
 $ otf        : chr "application/font-sfnt"
 $ ttf        : chr "application/font-sfnt"
 $ pfr        : chr "application/font-tdpfr"
 $ woff       : chr "application/font-woff"
 $ spl        : chr "application/futuresplash"
 $ gz         : chr "application/gzip"
 $ hta        : chr "application/hta"
 $ jar        : chr "application/java-archive"
 $ ser        : chr "application/java-serialized-object"
 $ class      : chr "application/java-vm"
 $ js         : chr "application/javascript"
 $ json       : chr "application/json"
 $ m3g        : chr "application/m3g"
 $ hqx        : chr "application/mac-binhex40"
 $ cpt        : chr "application/mac-compactpro"
 $ nb         : chr "application/mathematica"
 $ nbp        : chr "application/mathematica"
 $ mbox       : chr "application/mbox"
 $ mdb        : chr "application/msaccess"
 $ doc        : chr "application/msword"
 $ dot        : chr "application/msword"
 $ mxf        : chr "application/mxf"
 $ bin        : chr "application/octet-stream"
 $ deploy     : chr "application/octet-stream"
 $ msu        : chr "application/octet-stream"
 $ msp        : chr "application/octet-stream"
 $ oda        : chr "application/oda"
 $ opf        : chr "application/oebps-package+xml"
 $ ogx        : chr "application/ogg"
 $ one        : chr "application/onenote"
 $ onetoc2    : chr "application/onenote"
 $ onetmp     : chr "application/onenote"
 $ onepkg     : chr "application/onenote"
 $ pdf        : chr "application/pdf"
 $ pgp        : chr "application/pgp-encrypted"
 $ key        : chr "application/pgp-keys"
 $ sig        : chr "application/pgp-signature"
 $ prf        : chr "application/pics-rules"
 $ ps         : chr "application/postscript"
 $ ai         : chr "application/postscript"
 $ eps        : chr "application/postscript"
 $ epsi       : chr "application/postscript"
 $ epsf       : chr "application/postscript"
 $ eps2       : chr "application/postscript"
 $ eps3       : chr "application/postscript"
 $ rar        : chr "application/rar"
 $ rdf        : chr "application/rdf+xml"
 $ rtf        : chr "application/rtf"
 $ stl        : chr "application/sla"
 $ smi        : chr "application/smil+xml"
 $ smil       : chr "application/smil+xml"
 $ xhtml      : chr "application/xhtml+xml"
 $ xht        : chr "application/xhtml+xml"
 $ xml        : chr "application/xml"
 $ xsd        : chr "application/xml"
 $ xsl        : chr "application/xslt+xml"
 $ xslt       : chr "application/xslt+xml"
 $ xspf       : chr "application/xspf+xml"
 $ zip        : chr "application/zip"
 $ apk        : chr "application/vnd.android.package-archive"
 $ cdy        : chr "application/vnd.cinderella"
 $ deb        : chr "application/vnd.debian.binary-package"
 $ ddeb       : chr "application/vnd.debian.binary-package"
 $ udeb       : chr "application/vnd.debian.binary-package"
 $ sfd        : chr "application/vnd.font-fontforge-sfd"
 $ kml        : chr "application/vnd.google-earth.kml+xml"
 $ kmz        : chr "application/vnd.google-earth.kmz"
 $ xul        : chr "application/vnd.mozilla.xul+xml"
 $ xls        : chr "application/vnd.ms-excel"
 $ xlb        : chr "application/vnd.ms-excel"
 $ xlt        : chr "application/vnd.ms-excel"
 $ xlam       : chr "application/vnd.ms-excel.addin.macroEnabled.12"
 $ xlsb       : chr "application/vnd.ms-excel.sheet.binary.macroEnabled.12"
 $ xlsm       : chr "application/vnd.ms-excel.sheet.macroEnabled.12"
 $ xltm       : chr "application/vnd.ms-excel.template.macroEnabled.12"
 $ eot        : chr "application/vnd.ms-fontobject"
 $ thmx       : chr "application/vnd.ms-officetheme"
 $ cat        : chr "application/vnd.ms-pki.seccat"
 $ ppt        : chr "application/vnd.ms-powerpoint"
 $ pps        : chr "application/vnd.ms-powerpoint"
 $ ppam       : chr "application/vnd.ms-powerpoint.addin.macroEnabled.12"
 $ pptm       : chr "application/vnd.ms-powerpoint.presentation.macroEnabled.12"
 $ sldm       : chr "application/vnd.ms-powerpoint.slide.macroEnabled.12"
 $ ppsm       : chr "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"
 $ potm       : chr "application/vnd.ms-powerpoint.template.macroEnabled.12"
 $ docm       : chr "application/vnd.ms-word.document.macroEnabled.12"
 $ dotm       : chr "application/vnd.ms-word.template.macroEnabled.12"
 $ odc        : chr "application/vnd.oasis.opendocument.chart"
  [list output truncated]
              pdf 
"application/pdf" 
                    html                       js                      css 
             "text/html" "application/javascript"               "text/css" 
                   geojson                      jsonp 
"application/vnd.geo+json"   "application/javascript" 
                         r                         rd 
              "text/plain"               "text/plain" 
                       rmd                        rnw 
         "text/x-markdown"            "text/x-sweave" 
                     rproj                        yml 
            "text/rstudio"                "text/yaml" 
                      scss 
                "text/css" 

mime documentation built on Sept. 28, 2021, 9:07 a.m.