Images: $wgTrustedMediaFormats
List of trusted media-types and MIME types.
Introduced in version:1.5.0
Removed in version:still in use
Allowed values:Unspecified
Default value:(see below)

Details

List of trusted media-types and MIME types. MIME types are maintained by the IANA (Internet Assigned Numbers Authority). You may wish to consult a list of common MIME types and their associated file extensions before trying to determine what to add to $wgTrustedMediaFormats. Use the MEDIATYPE_xxx constants to represent media types.

Files that do not match an entry on this list will have the content of the system message MediaWiki:Mediawarning displayed on the image description page. The default message is:

<strong>Warning:</strong> This file type may contain malicious code.
By executing it, your system may be compromised.

Default values

MediaWiki version:
1.10
$wgTrustedMediaFormats = [
	MEDIATYPE_BITMAP, // <translate nowrap><!--T:9--> all bitmap formats</translate>
	MEDIATYPE_AUDIO, // <translate nowrap><!--T:10--> all audio formats</translate>
	MEDIATYPE_VIDEO, // <translate nowrap><!--T:11--> all plain video formats</translate>
	"image/svg+xml", // <translate nowrap><!--T:12--> svg (only needed if inline rendering of svg is not supported)</translate>
	"application/pdf", // <translate nowrap><!--T:13--> PDF files</translate>
	# "application/x-shockwave-flash", //<translate nowrap><!--T:14--> flash/shockwave movie</translate>
];
MediaWiki versions:
1.5 1.9
$wgTrustedMediaFormats= array(
	MEDIATYPE_BITMAP, //all bitmap formats
	MEDIATYPE_AUDIO,  //all audio formats
	MEDIATYPE_VIDEO,  //all plain video formats
	"image/svg",  //svg (only needed if inline rendering of svg is not supported)
	"application/pdf",  //PDF files
	#"application/x-shockwave-flash", //flash/shockwave movie
);
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.