手册:$wgTrudMediaFormats

This page is a translated version of the page Manual:$wgTrustedMediaFormats and the translation is 100% complete.
图片: $wgTrustedMediaFormats
受信任媒体类型和MIME类型的列表。
引进版本:1.5.0
移除版本:仍在使用
允许的值:未指定
默认值:(见下文)

详情

受信任媒体类型和MIME类型的列表。 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. 使用MediaType_xxx常量表示媒体类型。

与此列表中的条目不匹配的文件将在图像描述页面上显示系统消息MediaWiki:Mediawarning的内容。 默认消息是:

警告:该文件类型可能含有恶意代码。
执行后您的系统可能受损。

默认值

MediaWiki版本:
1.10
$wgTrustedMediaFormats = [
	MEDIATYPE_BITMAP, // 所有位图格式
	MEDIATYPE_AUDIO, // 所有声音格式
	MEDIATYPE_VIDEO, // 所有纯视频格式
	"image/svg+xml", // SVG(仅当不支持SVG的内联呈现时才需要)
	"application/pdf", // PDF文档
	# "application/x-shockwave-flash", //Flash动画
];
MediaWiki版本:
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
);