True if File should be served using ContentType:
ContentType. It
takes the following steps:
- Determine the media type using file_mime_type/2, unless
already specified using file_content_type/3.
- Determine it is a text file using text_mimetype/1
- Use the charset from the Prolog flag
default_charset
The behavior is controlled by several hooks and a flag.
- mime:mime_extension/2 defines the media type
- text_mimetype/1 defines the media type is text
- mime:charset/3 derives the charset for a file with a given
media type, if the media type is text according to
text_mimetype/1.
- If text_mimetype/1 succeeds and mime:charset/3 fails, the
flag
default_charset
defines the charset unless it is set
to -
. The flag set by default to UTF-8
if the Prolog
flag encoding
is set to utf8
.