Function fif::files::mime_extension_lookup
source · pub fn mime_extension_lookup(essence: String) -> Option<Vec<String>>
Expand description
Returns a list of known extensions for this MIME type, if any.
This function uses the Mime
’s “essence” rather than the Mime
itself - mime_guess::get_mime_extensions
ignores the type suffix, treating “image/svg+xml” as “image/svg”, and thus fails to find any extensions. Passing the
essence_str
(which includes the suffix) fixes this.