(ext-mime-type filename)
(ext-mime-type filename mime-types)
Get the mimetype from the filename extension. Takes an optional map of
extensions to mimetypes that overrides values in the default-mime-types map.
Source
(defn ext-mime-type
"Get the mimetype from the filename extension. Takes an optional map of
extensions to mimetypes that overrides values in the default-mime-types map."
([filename]
(ext-mime-type filename {}))
([filename mime-types]
(let [mime-types (merge default-mime-types mime-types)]
(mime-types (filename-ext filename)))))