Resolves MIME content types for local files based on their extension.
This is used by the file-based builders (Photo, Video, Voice,
Sticker, Document) so that uploaded media carries the correct Content-Type
header instead of a hardcoded value.
Summary
Functions
Returns the fallback MIME content type used for unknown extensions.
Returns the MIME content type for the given file path.
Functions
@spec default() :: String.t()
Returns the fallback MIME content type used for unknown extensions.
Returns the MIME content type for the given file path.
The lookup is based on the lowercased file extension. Unknown extensions
fall back to application/octet-stream.
Parameters
path- Path or filename of the file
Returns
A MIME content type string.