Mediawiki and Uploading Files
Uploading media files (pictures, etc.) to a Mediawiki website is cumbersome. As well it should be. For public sites like Wikipedia that is. But what about uploading pictures to a private Mediawiki website? Hint: We're back to that cumbersome thing. Ironically, the most cumbersome way to upload a media file is via Mediawiki's Visual Editor. Are there any solutions? YES!
In Mediawiki terminology, it's referred to as "Bulk Upload". And the best place to see what's available is here:https://www.mediawiki.org/wiki/Category:Bulk_upload
- UploadWizard: The word "wizard" says it all, in that it guides one through the process. So this one wins on the "friendly hand holding scale". Plus it's also the most complete in terms of making every attempt to merging the Wikipedia / Wiki Commons guidelines for uploading images, etc. for consideration of copyright and ownership information with the convenience of "Bulk Uploading"
- MsUpload: Fastest way to upload a bunch of files and dump them into an article.
- SimpleBatchUpload: Great for adding script bits to existing articles
Issue of Frustration
OK, first an issue to get out of the way. The work and effort put into these extensions is phenomenal. They work and they work well. And the people that have worked on them deserve quite a bit of praise and thanks. But that's not the issue.
The "issue" relates to the rather coy and obtuse documentation. This isn't in reference to how the extensions are downloaded, installed, configured, etc. It's how they're accessed by an end user. It is never explained in the documentation.
Case in point for the MsUpload Extension. Do a Google search for: "drop files here" "mediawiki" "extension" "msupload" (remember to put the search terms AND words in quotes, so Google doesn't attempt to "think" for you). As of the beginning of 2021 there are 12 results for that search. And none of those results are links to the documentation for the extension. Wouldn't it be useful if the documentation contained a description of how the Extension implements the description of what it is supposed to do? The answer should be YES! So here goes;
In addition to the sentence at the beginning of the current documentation for the MsUpload, how about this;
- Current Sentence: The MsUpload extension allows users to upload multiple files by drag & drop in the standard MediaWiki edit page.
- New Sentence: The MsUpload extension allows a user to upload multiple files by dragging and dropping those files into a new field at the top of the standard WikiEditor indicated by a "drop files here" area.
- Additional Second Sentence: After dragging and dropping the files into that area, the user will be prompted to "Upload this file" (Triggers the upload process) or "Clear" (Remove files from list).
- Additional Third Sentence: Once uploaded, the user has the opportunity to also insert the media file as a link ("Insert link") or as an image ("Insert as image") via two small links after the media file name.
- Final Version;
- The MsUpload extension allows a user to upload multiple files by dragging and dropping those files into a new field at the top of the standard WikiEditor indicated by a "drop files here" area. After dragging and dropping the files into that area, the user will be prompted to "Upload this file" (Triggers the upload process) or "Clear" (Remove files from list). Once uploaded, the user has the opportunity to also insert the media file as a link ("Insert link") or as an image ("Insert as image") via two small links after the media file name.
It may be obvious to someone already familiar with the extension. And not it isn't that difficult to figure out. But isn't that the point of documentation? Helping someone figure something out.
For Upload Wizard, add the following to the LocalSettings.php file (Remember, this article is for experienced Mediawiki users, so "hand holding" on where to find this file, it's in the root directory of your website by default) for the Mediawiki Site;
$wgEnableUploads = true; $wgUseImageMagick = true; $wgImageMagickConvertCommand = "/usr/bin/convert"; $wgApiFrameOptions = 'SAMEORIGIN'; wfLoadExtension( 'UploadWizard' );
And of course the ImageMagick (this Extension is included with a default Mediawiki installation, so no need to download it) and UploadWizard Extensions must be downloaded and then copied into the extensions directory.
The full documentation is here: https://www.mediawiki.org/wiki/Extension:UploadWizard
And yes there is an inaccuracy in the documentation. There's a section titled: "For GNU/Linux or Mac OS X users", which would seem to exclude Windows users. But do not fear. If you have a properly working WAMP stack, it'll work fine on Windows too (The same applies for Nginx, Lightppd, etc.).
If one needs the information on the "Learn" step of the Wizard, or you just want to get rid of the "Sorry, we could not find any files for the tutorial that is supposed to go here. Please contact the system administrators." warning, then add this to the LocalSettings.php file: $wgUseInstantCommons = true;
Or just check off the box that states, "Skip this step in the future." Checkbox. (see, those people worked very hard to think about many scenarios and how they could refine their wonderful extension and add a useful feature like that).