This page is a translated version of the page Manual:$wgUploadPath and the translation is 56% complete.
Other languages:
English • ‎français • ‎magyar • ‎polski • ‎português • ‎português do Brasil • ‎中文 • ‎日本語 • ‎한국어
サーバー URL とファイル パス: $wgUploadPath
アップロード ディレクトリのパス。
導入されたバージョン:pre 1.1.0
既定値:"{$wgScriptPath }/images" (1.8+)
"{$wgScriptPath }/upload" (pre-1.1 - 1.7)
(注: この変数の既定値は、他の変数に依存します。例えば、LocalSettings.php の実行後に Setup.php 内で値が設定される変数です)


アップロード ディレクトリへの相対パスです。 アップロードされたファイルの閲覧用の URL を構築する際に使用されます。

多くの場合、"/w/images" のような、パスの構成要素のみを指定します。 If uploaded files are served from a different domain, this can be a fully-qualified URL with hostname, such as "".

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 です。 ディレクトリ権限を設定するのも忘れないでください。

To enable permission checks on image files, $wgUploadPath can be pointed to the img_auth.php script ($wgUploadPath = "$wgScriptPath/img_auth.php";) - see Manual:画像認証 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