Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mimeTypeExtensions

Mapping from extension to MIME type


Description

This is a programmatically generated character vector whose names identify the MIME type typically associated with the extension which are the values. This is used in guessMIMEType. We can match an extension and then find the corresponding MIME type. There are duplicates.

Usage

data(mimeTypeExtensions)

Format

The format is a named character vector where the names are the MIME types and the values are the file extensions.

Source

The table of MIME types and extensions was programmatically extracted from http://www.webmaster-toolkit.com/mime-types.shtml or http://reference.sitepoint.com/html/mime-types-full with tbls = readHTMLTable("http://www.webmaster-toolkit.com/mime-types.shtml") tmp = tbls[[1]][-1,] mimeTypeExtensions = structure(as.character(tmp[[2]]), names = gsub("^\.", "", tmp[[1]])) save(mimeTypeExtensions, file = "data/mimeTypeExtensions.rda") The IANA list is not as convenient to programmatically compile.

Examples

data(mimeTypeExtensions)

RCurl

General Network (HTTP/FTP/...) Client Interface for R

v1.98-1.3
BSD_3_clause + file LICENSE
Authors
CRAN Team [ctb, cre] (de facto maintainer since 2013), Duncan Temple Lang [aut] (<https://orcid.org/0000-0003-0159-1546>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.