views:

111

answers:

3

Hi All,

I'm just installing MediaWiki (loving it). I'm lookin at this for adding images. I can se the logic of

[[File:MediaWiki:Image sample|50px]]

but where so I set the filepath for "File" (nothing obvious in LocalSettings.php) ... or is there some other logic at work?

I'd appreciate any help Thanks

A: 

Your "Image sample" is the name of image, not the name of a file. By config file you can just set the root folder for image uploads.

scaryzet
A: 

The defaults from DefaultSettings.php are:

$wgUploadPath = "$wgScriptPath/uploads";
$wgUploadDirectory = "$IP/uploads";

If you want to change this, you should copy and paste this into LocalSettings.php

And make sure that $wgEnableUploads = true; is in LocalSettings.php too.

Adrian Archer
+1  A: 

File location is determined by $wgLocalFileRepo which by default depends on $wgUploadDirectory and $wgHashedUploadDirectory. The upload directory defaults to [MediaWiki base dir]/images (Adrian must be using an older version). If hashing is enabled, /x/xy will be appended to the path, where xy are the first two letters of the md5 hash of the filename.

Tgr
yea you're right after 1.8 it defaulted to /images
Adrian Archer