Jump to: navigation, search
This page is a translated version of the page Manual:$wgHashedUploadDirectory and the translation is 39% complete.

Other languages:
العربية • ‎Deutsch • ‎English • ‎español • ‎فارسی • ‎日本語 • ‎polski
Uploads: $wgHashedUploadDirectory
If true, uses the /a/ab/foo.jpg directory structure.
導入されたバージョン: 1.4.0 (r5578)
除去されたバージョン: 使用中
可能な値: 真偽値
既定値: true
他の設定: アルファベット順 | 機能順


If true, uploaded files will be distributed into sub-directories of $wgUploadDirectoryManual:$wgUploadDirectory based on the first two characters of the md5 hash of the filename. (例: $IPManual:$IP/images/a/ab/foo.jpg) Creation of such subdirectories is handled automatically. This is used to avoid having too many files in one folder because some filesystems don't perform well with large numbers of files in one folder.

The algorithm for that is based on a md5 of the name, the first hex character is used for the first directory, then the first two characters are used for the subdirectory.

Foo.png → ファイル名の MD5 = f865cbca12286c1c5b7616b4a70fbf68 → f + f8 = $IPManual:$IP/images/f/f8/Foo.png

If false, all images are uploaded in $wgUploadDirectoryManual:$wgUploadDirectory itself. (例: $IPManual:$IP/images/foo.jpg)

This parameter should not be changed after the first image or file has been uploaded (or else you will need to move all previous uploaded pictures). It will result in PHP errors (see the discussion page) if articles with the old logic try to find their pictures, since the image path is calculated and not stored in the database.

If you set $wgLocalFileRepoManual:$wgLocalFileRepo, this variable will be ignored.