Manual:$wgUploadPath/pt

From Linux Web Expert

<translate> Server URLs and file paths</translate>: $wgUploadPath
O segmento do caminho da diretoria de envios.
<translate> Introduced in version:</translate>pre 1.1.0
<translate> Removed in version:</translate><translate> still in use</translate>
<translate> Allowed values:</translate>(caminho)
<translate> Default value:</translate>"{$wgScriptPath }/images" (1.8+)
"{$wgScriptPath }/upload" (pre-1.1 - 1.7)
(<translate> Note:</translate> <translate> The default value of this variable depends on other variables, such as the values set in <tvar|1>Setup.php </>, after <tvar|2>LocalSettings.php </> is executed</translate>)

Detalhes

O caminho relativo para a diretoria de envios. Isto é utilizado para criar os URLs para visualizar os ficheiros enviados.

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".

If the variable contains a local path (without "http://") then it must start with a slash, otherwise it will result in a bad URL. (For example if you set it to "foldername" it will result in files being loaded from "http://www.example.comfoldername" - note the missing slash after ".com")

$wgEnableUploads é false por predefinição. Lembre-se também de definir as permissões de diretoria.

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 authorization for instructions.

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 a different folder ($wgUploadDirectory) than from where MediaWiki will try to retrieve them for viewing ($wgUploadPath)!
If using $wgUseInstantCommons or $wgForeignFileRepos with file caching enabled, cached foreign files will be served from $wgUploadPath

Ver também