|If true, uses the /a/ab/foo.jpg directory structure.
|Introduced in version:||1.4.0 (r5578)|
|Removed in version:||still in use|
Details[edit | edit source]
true, uploaded files will be distributed into sub-directories of $wgUploadDirectory based on the first two characters of the md5 hash of the filename. (e.g.
$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 of filename =
f865cbca12286c1c5b7616b4a70fbf68→ f + f8 = $IP/images/f/f8/Foo.png
If you set
$wgLocalFileRepo, this variable will be ignored.
See also[edit | edit source]
- $wgHashedSharedUploadDirectory for shared uploads
- $wgLocalFileRepo for changing the hash level (number of characters used from the hash)
|Language:||English • 日本語|