Manual:$wgCopyUploadsDomains/zh
From Linux Web Expert
<translate> Files and file uploads</translate>: $wgCopyUploadsDomains | |
---|---|
指定$wgAllowCopyUploads 允许特定的域列表 |
|
<translate> Introduced in version:</translate> | 1.20.0 (Gerrit change 16946; git #8c6c29b3) |
<translate> Removed in version:</translate> | <translate> still in use</translate> |
<translate> Allowed values:</translate> | (数组) |
<translate> Default value:</translate> | [] |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
细节
白名单中的域可以包含通配符(*)来代替任何域级别,例如:'*.flickr.com' 和 'upload.*.gov.uk'。
如果该数组为空(默认),所有的域名都会被允许。
用法示例
该示例将设定自动确认用户可以通过Special:Upload 或 API 上传指定来自Flickr及一些英国政府网站的内容。 将下列代码放置在您的LocalSettings.php 的底部:
$wgGroupPermissions['autoconfirmed']['upload_by_url'] = true;
$wgAllowCopyUploads = true;
$wgCopyUploadsFromSpecialUpload = true;
$wgCopyUploadsDomains = array( '*.flickr.com', 'upload.*.gov.uk' );