Manual:$wgTrustedMediaFormats/zh
From Linux Web Expert
<translate> Images</translate>: $wgTrustedMediaFormats | |
---|---|
受信任媒体类型和MIME类型的列表。 |
|
<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> | (见下文) |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
详情
受信任媒体类型和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的内容。 默认消息是:
Warning: This file type may contain malicious code. By executing it, your system may be compromised.
默认值
MediaWiki版本: | <translate> ≥</translate> 1.10 |
$wgTrustedMediaFormats = [
MEDIATYPE_BITMAP, // 所有位图格式
MEDIATYPE_AUDIO, // 所有声音格式
MEDIATYPE_VIDEO, // 所有纯视频格式
"image/svg+xml", // SVG(仅当不支持SVG的内联呈现时才需要)
"application/pdf", // PDF文档
# "application/x-shockwave-flash", //Flash动画
];
1.5 – 1.9
<translate> MediaWiki versions:</translate> |
$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
);