Lucee Function Reference
filegetmimetype()
Returns the mimetype of the given file
Example
filegetmimetype(any file,[boolean strict]):string
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Default Value | Description |
---|---|---|---|---|
file | any | Yes | file path or object | |
strict | boolean | No | true |
if set to true, Lucee checks the header of the file, when set to false, Lucee only checks the extension. When true, an empty or non existent file will throw an error. Lucee uses Apache Tika for detection, but only the basic core version and does not include the full suite of tika parsers due to their size. |