Manual:$wgTrustedMediaFormats
From MediaWiki.org
Images: $wgTrustedMediaFormats | |
---|---|
List of trusted media-types and mime types. |
|
Introduced in version: | 1.5.0 |
Removed in version: | still in use |
Allowed values: | |
Default value: | (see below) |
Other settings: Alphabetical | By Function
Details [edit]
List of trusted media-types and mime types. Use the MEDIATYPE_xxx constants to represent media types. This list is used by Image::isSafeFile
MIME types not listed here will have the content of the system message MediaWiki:Mediawarning displayed on the images description page. The default message is:
Warning: This file may contain malicious code, by executing it your system may be compromised.
It would also be possible to use this for further restrictions, like disabling direct [[media:...]] links for non-trusted formats.
Default value [edit]
$wgTrustedMediaFormats = array( MEDIATYPE_BITMAP, //all bitmap formats MEDIATYPE_AUDIO, //all audio formats MEDIATYPE_VIDEO, //all plain video formats "image/svg+xml", //svg (only needed if inline rendering of svg is not supported) "application/pdf", //PDF files #"application/x-shockwave-flash", //flash/shockwave movie );