Opas:$wgEnableUploads
Appearance
Files and file uploads: $wgEnableUploads | |
---|---|
Salli kuvien ja muiden tiedostojen lataamisen wikissä. |
|
Introduced in version: | 1.5.0 |
Removed in version: | Still in use |
Allowed values: | (totuusarvo) |
Default value: | false |
Other settings: Alphabetical | By function |
Tiedot
Kun tiedostosta LocalSettings.php
löytyy tämä muuttuja asetettuna tosiarvoon true
, käyttäjillä on oikeus tallentaa kuvia ja muita tiedostoja.
Users will see an Tallenna tiedosto
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).
Kohdetiedoston nimi:
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
Kohdetiedoston nimi:
, uploading this file without changingKohdetiedoston nimi:
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! Kokoonpanoasetuksia on monia. It is recommended to read the more complete instructions at Manual:Configuring file uploads
Katso myös
- Opas:$wgUploadDirectory - jos halutaan vaihtaa oletuskansiota, joka on
/images
. - Manual:$wgUploadSizeWarning
- Manual:$wgMaxUploadSize - oletus on 100 Mt, muuta sitä jos on tarvetta.
- Manual:Configuring file uploads
- Manual:Configuration settings#Uploads - luettelo kaikista tiedostojen lataamiseen liittyvistä kokoonpanomuuttujista
- Luokka:Tallennusmuuttujat - similar list as a category (ordered alphabetically)
- Manual:Interface/Uploaddisabledtext - message at Special:Upload if uploads disabled
- file_uploads php.ini directive.
Tämä on oltava käytössä, jotta tallentamiset toimivat