Manual:$wgMimeDetectorCommand/de-formal

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
<translate> MIME types</translate>: $wgMimeDetectorCommand
Sets an external MIME detector program.
<translate> Introduced in version:</translate>1.5.0
<translate> Removed in version:</translate><translate> still in use</translate>
<translate> Allowed values:</translate><translate> Unspecified</translate>
<translate> Default value:</translate>null

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 this setting is not set, the PHP fileinfo extension will be used, or if that is unavailable, the PHP function mime_content_type() will be used.

It is important to note that MediaWiki itself performs a set of MIME detection tests itself, and only if those are unsuccessful is the MIME detector invoked. See Manual:MIME type detection for more information about this whole process. See also Manual:Configuring file uploads .

Example (Linux):

$wgMimeDetectorCommand = "file --brief --mime";

or shortly,

$wgMimeDetectorCommand = "file -bi";