This page is a translated version of the page Manual:$wgFileStore and the translation is 27% complete.
Dateien und Datei-Uploads: $wgFileStore
File storage paths; currently used only for deleted files.
Eingeführt in Version:1.7.0 (r14777)
Veraltet in Version:1.17.0 (r69007)
Entfernt in Version:1.24.0 (Gerrit change 145738; git #5842d0aa)
Erlaubte Werte:siehe unten
Standardwert:siehe unten


File storage paths; was last used only for deleted files.

The setting contains an array of arrays. The first index is the name of the type of file being stored (currently only 'deleted' is valid) and the second index is one of the following three keys:

  • 'directory' contains the directory on the server where the files will be saved. As of version 1.17, this is superseded by $wgDeletedDirectory .
  • 'url' contains the URL used to access the file over the internet.

If the file is private (as for deleted files) this should be null. As of version 1.23, this value is ignored.

  • 'hash' contains the number of levels of subdirectory to create under the specified directory. E.g. if you set this to 3, images will be stored in paths such as /a/b/a/Abacus.jpg (relative to the above directories).

As of version 1.17, this is superseded by $wgHashedUploadDirectory .


MediaWiki Versions:
1.11 – 1.23

Deleted images are stored by default in "$wgUploadDirectory /deleted". $wgFileStore can be used to customize this:

Die Standardeinstellungen sind:

$wgFileStore['deleted']['directory'] = false;// Defaults to $wgUploadDirectory/deleted
$wgFileStore['deleted']['url'] = null;       // Private, so set to null
$wgFileStore['deleted']['hash'] = 3;         // 3-level subdirectory split
MediaWiki Versions:
1.7 – 1.10

Prior to MediaWiki 1.11, deleted files are simply discarded by default; see $wgSaveDeletedFiles for how to enable storing them. To enable undeletion, the 'deleted directory' must be defined and $wgSaveDeletedFiles must be true.

Die Standardeinstellungen sind:

$wgFileStore = array();
$wgFileStore['deleted']['directory'] = null; // Don't forget to set this.
$wgFileStore['deleted']['url'] = null;       // Private
$wgFileStore['deleted']['hash'] = 3;         // 3-level subdirectory split


An example enabling saving deleted images:

$wgSaveDeletedFiles = true;                                    // Not required in MW 1.11.0 and above.
$wgFileStore['deleted']['directory'] = "$IP/imagesDeleted";
$wgFileStore['deleted']['url'] = null; 
$wgFileStore['deleted']['hash'] = 3;

The 'deleted url' can remain null (as the deleted files are private, not visible to the Internet).

Siehe auch