Hi,
I want to use a folder with images in my MW installation and found the variable $wgForeignFileRepos [1]. But I don't know how to add an simple folder without an API or Database ... something like the following:
$wgForeignFileRepos[] = array( 'class' => 'FSRepo', 'name' => 'shared2FSRepo ', 'directory' => '/srv/images/', 'url' => 'http://myhost.ltd/images/' );
Maybe someone may add examples for the other "classes" ... LocalRepo, ForeignDBRepo, FSRepo and ForeignAPIRepo. ... to the existing one for Commons ?
best regards
Thomas _________ [1] http://www.mediawiki.org/wiki/Manual:$wgForeignFileRepos
thdemon wrote:
Hi,
I want to use a folder with images in my MW installation and found the variable $wgForeignFileRepos [1]. But I don't know how to add an simple folder without an API or Database ... something like the following:
$wgForeignFileRepos[] = array( 'class' => 'FSRepo', 'name' => 'shared2FSRepo ', 'directory' => '/srv/images/', 'url' => 'http://myhost.ltd/images/' );
Maybe someone may add examples for the other "classes" ... LocalRepo, ForeignDBRepo, FSRepo and ForeignAPIRepo. ... to the existing one for Commons ?
FSRepo was tested for this application when it was first written, and it will probably work. You will need to set hashLevels=0 in addition to the settings you have there if all the files are in the one directory.
However, this is just a demonstration feature at present, and will probably be too slow for busy wikis or slow servers due to the lack of caching.
-- Tim Starling
mediawiki-l@lists.wikimedia.org