On Thu, Apr 17, 2008 at 11:46 PM, George Williams
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am creating a program which bulk imports a ton of images to the mediawiki
> "images" directory.
>
> I would rather use a mediawiki api call to do this, but it does not seem to
> be available.
>
> Does anyone know the schema of the "images" directory.  It appears to be
> some kind of hash/tree structure in the file system.  I just need to know
> what the hash function is, so that I can place the image in the right
> directory myself.
>
> I will be happy to look through the source code to see how its done as well
> - could someone point me to the right src file to look at?
>
> Thanx, in advance!
>
> -George
>
>
> _______________________________________________
>  Mediawiki-api mailing list
>  [email protected]
>  https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
includes/filerepo/LocalFile.php and LocalRepo.php

The file structure depends on you settings. On Wikimedia it is
/images/md5(img_name)[0]/md5(img_name)[0:1]/img_name where img_name is
the properly normalized name of the image. There should also be a
maintenance script in /maintenance

Bryan

_______________________________________________
Mediawiki-api mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to