thx for answers
I've checked it, but there is only some general info. What I need is to know the exact location of a file when it gets uploaded.
Regards Aretai
On 3/6/07, Dorozynski Janusz dorozynskij@wampnm.webd.pl wrote:
| -----Original Message----- | From: ... aretai aretai | Sent: Tuesday, March 06, 2007 5:29 PM / | I'd like to have a link to an image located on my host | instead. All images are stored in the images directory within | wiki. Below are some | subdirectories: d, f, etc. | | Is there any rule where is given image placed while being uploaded?
http://www.mediawiki.org/wiki/Manual:MediaWiki_file_usage helps you, I hope.
Reg, Janusz "Ency" Dorozynski
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On 07/03/07, aretai aretai aretaiuc@gmail.com wrote:
I've checked it, but there is only some general info. What I need is to know the exact location of a file when it gets uploaded.
In the default configuration, when $wgHashedUploadDirectory is switched on, the filename is hashed (MD5), and the first part of the hash is exploded, e.g. "83aff429..." becomes /8/83/<full filename>. This is appended to the upload directory and is used to store the file proper.
The code which handles this can be found in includes/Image.php and includes/ImageFunctions.php, e.g. wfGetHashPath() etc.
Rob Church
Hi,
thx for answers.
Is it possible to make wiki store all the images in the same folder or will it cause any problems? In case there is an existing wiki and images were stored in a way you've described is there a way to migrate them to a single folder (and make wiki to point to a new location) without disrupting the wiki service?
Regards, Aretai
On 3/7/07, Rob Church robchur@gmail.com wrote:
On 07/03/07, aretai aretai aretaiuc@gmail.com wrote:
I've checked it, but there is only some general info. What I need is to
know
the exact location of a file when it gets uploaded.
In the default configuration, when $wgHashedUploadDirectory is switched on, the filename is hashed (MD5), and the first part of the hash is exploded, e.g. "83aff429..." becomes /8/83/<full filename>. This is appended to the upload directory and is used to store the file proper.
The code which handles this can be found in includes/Image.php and includes/ImageFunctions.php, e.g. wfGetHashPath() etc.
Rob Church
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
You can store all the images on the same folder by setting $wgHashedUploadDirectory=false; The wiki can handle it without problems, splitting on folders is done because some filesystems have problems (are slower) when a folder has lots of files.
2007/3/7, Platonides Platonides@gmail.com:
The wiki can handle it without problems, splitting on folders is done because some filesystems have problems (are slower) when a folder has lots of files.
Aretai, mind this warning. It can be *extremely slow* if you have a large number of files (several thousands, or close to a million).
I suggest you estimate how many images your wiki may accumulate for some time, say a few years, and try to create that many files on your filesystem using an automated script. Then test access time to these files.
Anyway, are you sure you need them in just one directory?
On 07/03/07, Fernando Correia fernandoacorreia@gmail.com wrote:
2007/3/7, Platonides Platonides@gmail.com:
The wiki can handle it without problems, splitting on folders is done because some filesystems have problems (are slower) when a folder has lots of files.
Aretai, mind this warning. It can be *extremely slow* if you have a large number of files (several thousands, or close to a million).
I suggest you estimate how many images your wiki may accumulate for some time, say a few years, and try to create that many files on your filesystem using an automated script. Then test access time to these files.
Anyway, are you sure you need them in just one directory?
Oh, and just to add - if the whole reason for asking is due to concerns over migration or mass-imports, then there are maintenance scripts (maintenance/importImages.php, maintenance/rebuildImages.php) that can help.
Rob Church
I'd prefer to keep it as it is..., but well this makes a coding (i.e. linking to this images from external application) a little bit tricker. Coding will be probably performed by non-MW programmer so want to make his task a little bit easier.
But yes performance issues are v.imp so probably it will be necessary to keep the directory structure.
Regards, Aretai
On 3/7/07, Fernando Correia fernandoacorreia@gmail.com wrote:
2007/3/7, Platonides Platonides@gmail.com:
The wiki can handle it without problems, splitting on folders is done because some filesystems have problems (are slower) when a folder has lots of files.
Aretai, mind this warning. It can be *extremely slow* if you have a large number of files (several thousands, or close to a million).
I suggest you estimate how many images your wiki may accumulate for some time, say a few years, and try to create that many files on your filesystem using an automated script. Then test access time to these files.
Anyway, are you sure you need them in just one directory?
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On 07/03/07, aretai aretai aretaiuc@gmail.com wrote:
I'd prefer to keep it as it is..., but well this makes a coding (i.e. linking to this images from external application) a little bit tricker. Coding will be probably performed by non-MW programmer so want to make his task a little bit easier.
I think someone else pointed out the FilePath extension in Subversion, which issues an HTTP location header with the full URL to the image, which can be used in things like <img> tags, etc.
Rob Church
mediawiki-l@lists.wikimedia.org