Version (v1.3) of MIME settings
In the MIME settings dialog it is possible to set the parameters affecting MIME detection engine. Besides the blacklist / whitelist functionality for selected MIME types, the engine also performs refinement of MIME types for all uploaded files (the original MIME type set by a browser may not be reliable). So if maximum accuracy of file MIME types is desired, this engine should be enabled, even if no blocking is set.
The following parameters can be set:
Maximum file size limit
Specifies the maximum file size for which to perform the check by the engine.
Treat oversize as clean
If this is enabled and the check is skipped because the file is too big, the file is considered “clean” (like if the check was performed and found no problems). If this is disabled, then such file is considered “unclean” (like if the check was performed and found a problem) and the whole package will be quarantined.
Detection mode
If set to blacklist mode, the packages with files matching the selected MIME types are quarantined. If set to whitelist mode, all packages with files not matching one of the selected MIME types are quarantined.
Selected file types
Sets the MIME file types, which the files should be checked for in whitelist or blacklist mode. One MIME type per one line. The list could be empty, which in blacklist mode causes no packages to be quarantined, but the detection is performed and the refined MIME types are set for each of the checked files.
MIME types may be entered in the form of regular expressions, so for example the following is a valid specification of a group of MIME types: “video/.*“, which should cover all known video formats.
Supported MIME types are listed here: https://raw.githubusercontent.com/apache/tika/master/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
For some types of content, deep detection is performed, scanning even nested files (for example files in archives, office documents, etc.). The types of these deeply scanned containers are listed here: https://tika.apache.org/1.22/formats.html.
The whole MIME settings dialog looks like this: