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
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With