Safe Haskell | None |
---|
- mimeByExt :: MimeMap -> MimeType -> FileName -> MimeType
- defaultMimeLookup :: FileName -> MimeType
- defaultMimeType :: MimeType
- defaultMimeMap :: MimeMap
- fileNameExtensions :: FileName -> [Extension]
- type FileName = Text
- type MimeType = ByteString
- type MimeMap = Map Extension MimeType
- type Extension = Text
Lookups
Look up a mime type from the given mime map and default mime type.
defaultMimeLookup :: FileName -> MimeTypeSource
mimeByExt
applied to defaultMimeType
and defaultMimeMap
.
Defaults
defaultMimeType :: MimeTypeSource
The default fallback mime type "application/octet-stream".
defaultMimeMap :: MimeMapSource
A default mapping from filename extension to mime type.
Generated from the Apache and nginx mime.types files.
Utilities
fileNameExtensions :: FileName -> [Extension]Source
Get a list of all of the file name extensions from a piece.
pieceExtensions "foo.tar.gz" == ["tar.gz", "gz"]
Types
The filename component of a filepath, leaving off the directory but keeping all extensions.
type MimeType = ByteStringSource
Individual mime type for be served over the wire.