File.extensionToMimeType
File.extensionToMimeType($fileExtension) -> string
Description
Infer the MIME type for the given file extension.
If the MIME type is unknown, it returns 'application/octet-stream'.
NoteThe number of possible MIME types is effectively limitless. This function only covers the most common MIME types related to the web (about 70 total).
File.extensionToMimeType('png')
//= 'image/png'
File.extensionToMimeType('htm')
//= 'text/html'
File.extensionToMimeType('xyz')
//= 'application/octet-stream'