Manual:$wgUploadPath

From MediaWiki.org

Jump to: navigation, search
Uploads: $wgUploadPath
The URL of the upload directory.
Introduced in version: pre 1.1.0
Removed in version: still in use
Allowed Values: relative path
Default Value: "{$wgScriptPath}/images"
"{$wgScriptPath}/upload" prior to 1.8.0

Other settings: Alphabetical | By Function


[edit] Details

The absolute URL of the upload directory. This is used to construct URL for viewing uploaded files.

In most cases this is just the path component, such as "/w/images". If uploaded files are served from a different domain, this can be a fully-qualified URL with hostname, such as "http://upload.wikimedia.org/wikipedia/en".

Note: $wgEnableUploads is commented out by default. Also remember to set directory permissions.

To enable permission checks on image files, $wgUploadPath can be pointed to the img_auth.php script ( $wgUploadPath = $wgScriptPath."/img_auth.php"; ) - see Manual:Image Authorisation for instructions.

Note Note: : There are other variables which are defined relative to this one. If you redefine this in your LocalSettings.php then all dependent variables including wgUploadDirectory will need redefining also. If both these settings are not coherent the files will be uploaded to different folder ($wgUploadDirectory) than from where MediaWiki will try to retrieve it for viewing ($wgScriptPath)!

Personal tools