Manual:$wgCopyUploadsDomains

From MediaWiki.org
Jump to: navigation, search

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎日本語 • ‎polski • ‎português • ‎português do Brasil
Uploads: $wgCopyUploadsDomains
Limit $wgAllowCopyUploads to a specific whitelist
Introduced in version: 1.20.0 (git #8c6c29b3)
Removed in version: still in use
Allowed values: array
Default value: array()
Other settings: Alphabetical | By function

Details[edit]

The domains in the whitelist can include wildcard characters (*) in place of any of the domain levels, e.g. '*.flickr.com' or 'upload.*.gov.uk'.

If this array is empty (per the default), all domains are accepted.

Example usage[edit]

This example setup will allow all autoconfirmed users to upload by URL, via Special:Upload or the API, from Flickr and some UK Government websites only. Add to the bottom of your LocalSettings.phpManual:LocalSettings.php:

$wgGroupPermissions['autoconfirmed']['upload_by_url'] = true;
$wgAllowCopyUploads = true;
$wgCopyUploadsFromSpecialUpload = true;
$wgCopyUploadsDomains = array( '*.flickr.com', 'upload.*.gov.uk' );

See also[edit]