it makes completely sense to store files in 9999 subdirs thinking of the
myriade files that Wikipedia one day will have to host,
on the other hand for small wiki-sites, that maybe will have to deal with
maybe 50 Pictures and 10 Files this might provide extra burden.
What speaks against letting that behaviour be switched on (default) and OFF
in Localsettings.php, if OFF the files are simply stored and searched in the
upload-dir without further subdirs?
Maybe I am wrong when I guess that for Bryan or some of the real good
Wiki-Hackers that is a 5-10 min. task to add that adequat
variable-questioning in the 2 positions (upload/retrieval) in the code.
xxx
HeliR
-----Ursprungliche Nachricht-----
Von: mediawiki-l-bounces(a)Wikimedia.org
[mailto:mediawiki-l-bounces@Wikimedia.org]Im Auftrag von Rowan Collins
Gesendet: Freitag, 03. Dezember 2004 05:58
An: MediaWiki announcements and site admin list
Betreff: Re: [Mediawiki-l] Save mode and File uploading
On Fri, 03 Dec 2004 14:35:42 +1100, John Yu <jyu(a)objectmastery.com> wrote:
Hmm, the ellipses in your list... you mean I need
to create all
directories 0/00 to f/ff? Including the subdirs under temp and archive,
that's 9000+ directories to create! Is that right?
Uploads are filed based on md5sums; so, yeah, the maximum layout's
gonna be pretty humongous. Easily done though, if you can get at a
shell and Perl:
$ cd /path/to/your/wiki/images
$ mkdir archive temp
$ perl -e '@hex=("0".."9", "a".."f"); for
$pre ("", "archive/",
"temp/") { for $w (@hex) { mkdir("$pre$w"); for $x (@hex) {for $y
(@hex) { mkdir("$pre$w/$x$y") } } } }'
And then adjust the ownership of everything recursively if need be.
If you *don't* have shell access, it's not so easy; either you could
get Perl to issue FTP commands from your home PC (I bet there are
plenty of modules on CPAN that make *that* easy); or, you could just
edit MediaWiki so that it stores uploads in one flat directory.
What about images/thumb directory? Do I need to
create 0/00-f/ff
subdirectories under it as well?
Oh, well, if you do, add thumb to the mkdir line, and "thumb\" to the
same list as "archive/" and "temp/"
;)
--
Rowan Collins BSc
[IMSoP]
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l