Skip to main content

mime_for

Function mime_for 

Source
fn mime_for(name: &str) -> &'static str
Expand description

A content type for the file, from its extension, as a browser’s own file picker would give it. An extension not known here gets no type at all (empty), as the picker gives one it doesn’t know, rather than a forced generic one a page might reject.