手册:$wgEnableUploads

From MediaWiki.org
Jump to: navigation, search
This page is a translated version of the page Manual:$wgEnableUploads and the translation is 33% complete.

Other languages:
English • ‎français • ‎日本語 • ‎polski • ‎português do Brasil • ‎中文
Uploads:$wgEnableUploads
允许通过wiki上传图片和其他文件。
引进版本: 1.5.0
移除版本: 仍在使用
允许的值: boolean
默认值: false
其他设置:按首字母排序 | 按功能排序

细节[edit]

Found in the LocalSettings.php file, when set to true, users will be allowed to upload images and other enabled files. Users will see an 'Upload file' link appearing in the toolbox on the bottom-left (usually), linking to the Special:Upload page. This link appears for users with the 'upload' right (logged-in users by default).

  • Destination filename field there in Special:Upload page is a case sensitive field and should be used to give descriptive filename instead of using the default one populated from source file name.
  • If a file already exists in the system with name Destination filename, uploading this file without changing Destination filename will create a archive file and store the older version in /images/archive folder.

注意 注意: When enabling file uploads, you must also make the images directory writable by the web server, otherwise you will just see an error such as failed to open stream: Operation not permitted or Could not create directory "mwstore://local-backend/local-public/0/00". Note that a web server writable directory is not insecure in itself, but can be thought of as the first half of a successful attack to your web server, as such you might like to explore alternatives using img_auth.php

IMPORTANT: Uploads need to be set up properly in order to be secure! There are several related configuration settings. It is recommended to read the more complete instructions at 手册:配置文件上传Manual:Configuring file uploads

较老的版本[edit]

在1.5.0版之前,$wgDisableUploadsManual:$wgDisableUploads曾被使用。

参见[edit]