Jump to content

Topic on Project:Support desk/Flow

Change the Upload file location

3
Summary by MarkAHershberger

"...with your help now its working."

187.32.64.135 (talkcontribs)

I want to change the upload file location other than /var/www/mediawiki/images, like that one: /home/webpages/wiki-images.

I try change some variables to point to /home/webpages/wiki-images, like below in LocalSettings.php.

$wgUploadDirectory = "/home/webpages/wiki-images";

$wgUploadPath = "/home/webpages/wiki-images";

The uploaded files goes to the correct directory, but I cannot play or use the uploaded file in the pages. The link and a empty thumb to file appears but no real image or video is show.

I'm new to MediaWiki and I already looked at google and FAQ to try to solve my problem with no solution.

Have this a solution ? Thank you!

MarkAHershberger (talkcontribs)

The value you provide in $wgUploadPath should be the URL path that the uploads are available at. If you want to serve images from /home/webpages/wiki-images, then you need to tell your webserver to point a url (say http://yoursite.com/wikimages) to that directory.

Often this will involve something like adding

 Alias /wikimages /home/webpages/wiki-images

to the /etc/apache2/apache2.conf file.

187.32.64.135 (talkcontribs)

Thanks, with your help now its working.