pub fn get_mime_type(search_ext: &str) -> Mime
๐Deprecated since 2.0.0: use
from_ext(search_ext).first_or_octet_stream()
insteadExpand description
Get the MIME type associated with a file extension.
If there is no association for the extension, or ext
is empty,
application/octet-stream
is returned.
ยงNote
In HTTP applications, it might be preferable to not send a Content-Type
header at all instead of defaulting to application/octet-stream
.