Manual:$wgMimeDetectorCommand
From MediaWiki.org
MIME types: $wgMimeDetectorCommand | |
---|---|
Sets an external mime detector program. |
|
Introduced in version: | 1.5.0 |
Removed in version: | still in use |
Allowed values: | |
Default value: | null |
Other settings: Alphabetical | By Function
[edit] Details
Sets an external mime detector program. The command must print only the mime type to standard output. The name of the file to process will be appended to the command given here. If not set or NULL, the PHP function mime_content_type()
will be used if available (PHP >= 4.3.0).
Note: Before the configured method for MIME detection is called, some hard-coded checks are applied. Use debug logging to find out if those checks cause false-positives. (For example, 1.15.3 may misdetect .doc-files from MS Word 2007 as ZIP files.)
See Manual:Mime type detection for details. See also Manual:Configuring file uploads.
Example (Linux):
$wgMimeDetectorCommand = "file --brief --mime";
or shortly,
$wgMimeDetectorCommand = "file -bi";
Language: | English • 日本語 |
---|