Topic on Project:Support desk

Thumbnails don’t work when uploads directory is in alternative location

7
Summary by Minoa

$wgUploadDirectory cannot use $wgServer, and it has to be an absolute directory path, you know, like how you write the path to a file or directory on your local computer. MW could probably add a tutorial on alternative upload locations so others can get it right on the first try, given one already exists for short article URLs.

Minoa (talkcontribs)

Hello all, at the moment the Interent Archive is not saving images from my wiki because despite having this syntax in robots.txt:

Allow: /w/images/
Disallow: /w/

The Interent Archive continues to ignore the entirety of /w/. For this reasons, I plan to move the uploads directory from /w/images/ to /uploads/ so that the Web Archive can archive images. I have been doing a test with a local wiki, setting the following values:

$wgUploadDirectory = "{$wgServer}/uploads";
$wgUploadPath      = "{$wgServer}/uploads";

The uploads directory was moved for the test, obviously.

The existing images appear as expected, but I get a "Error creating thumbnail: File missing" despite having rsvg and ImageMagick configured correctly. Also, when test an upload a (SVG) file, I get an error that says "Action failed: Could not open lock file for "mwstore://local-backend/local-public/7/78/example.svg"."

I need help on how to move the upload directory properly. I am hoping that it isn't hard-coded to /w/images.

  • MediaWiki 1.30
  • PHP 5.6.30
  • Database MySQL 5.5.55
Minoa (talkcontribs)

I am getting really exasperated, because an anonymous IP user attempted to hide my request so I don't get any help. This is not acceptable.

星耀晨曦 (talkcontribs)

Please make sure your upload directory is readable and writable for your webserver-user.

Minoa (talkcontribs)

For the record, it was set to 777 recursive (I know it should be 755, but it was a local test server). Apologies for the exasperation, though.

Bvvv-123 (talkcontribs)

MediaWiki 1.30

  • PHP 5.6.30
  • Database MySQL 5.5.55
Ciencia Al Poder (talkcontribs)
Minoa (talkcontribs)

Yes, setting $wgUploadDirectory to a filesystem path (e.g. /users/User/Sites/example.tld/uploads/) does work. I don't know why I thought of that before since I had to treat it as if it was live, and thus I thought using $wgServer would work. Marking as solved.