Extension:MultiUpload

From MediaWiki.org
Jump to: navigation, search

Other languages:
Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎italiano • ‎日本語 • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎中文
MediaWiki extensions manual
Crystal Clear action run.png
MultiUpload

Release status: beta

MultiUpload Screenshot - Ghost.png
Implementation Special page
Description Allows users to upload more than one file at a time
Author(s) Lee Worden (originally by Travis Derouin)
Latest version 3.0 (2014-04-09)
MediaWiki 1.19+
Database changes No
License GNU General Public License 2.0 or later
Download
README
Parameters

$wgMultiUploadInitialNumberOfImportRows, $wgMultiUploadTempDir

Translate the MultiUpload extension if it is available at translatewiki.net

Check usage and version matrix; code metrics

Phabricator:

Open tasks · Report a bug

The MultiUpload extension allows users to upload more than one file at a time. It aso unpacks package files (.zip, .tar, .tar.gz, and .tgz), allowing the files found in the package to be uploaded to the wiki.

Installation[edit | edit source]

  • Download and extract the file(s) in a directory called MultiUpload in your extensions/ folder. If you're a developer and this extension is in a Git repository, then instead you should clone the repository.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/MultiUpload/MultiUpload.php";
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.
For this extension to work, you have to have already allowed uploads on your wiki, see Manual:Configuring file uploads.

Options[edit | edit source]

Creating links to the extension[edit | edit source]

In the sidebar[edit | edit source]

To add a link to the sidebar by editing MediaWiki:Sidebar, adding a new line:

** Special:Multiupload|multiupload ("upload files")

or

** Special:Multiupload|multiupload-toolbox ("Upload multiple files").
In both examples of adding links to this extension in MediaWiki:Sidebar, if only "multipleupload" or "multipleupload-toolbox" shows in the sidebar, you may have to navigate in your wiki to "MediaWiki:Multipleupload" or "MediaWiki:Multipleupload-toolbox" and create the pages with the messages that are already shown.


Replacing 'Upload file' with MultiUpload in the sidebar[edit | edit source]

In the LocalSettings.php file, right below the last require_once line add:

$wgUploadNavigationUrl = "{$wgScriptPath}/index.php?title=Special:MultiUpload";

Setting the maximum number of files to upload[edit | edit source]

Warning Warning: As of r115614, the $wgMaxUploadFiles global isn't respected. After that commit, members of the staff group could upload 40 files at once via Special:MultiUpload, whereas sysop group could upload 20 at once, autoconfirmed could upload 10 and all other registered users could upload 5 files at once. Now, after complete replacement of the source code, it begins with one file and adds more as files are selected, with no upper limit.

To set the number of files to upload at once, Configure $wgMaxUploadFiles in your local settings file, the default setting is 5. The $wgMaxUploadFiles statement must be made after the require_once call. For example:

require_once("$IP/extensions/MultiUpload/MultiUpload.php");
$wgMaxUploadFiles = 10;

Messages[edit | edit source]

Warning Warning: These messages and their names have changed since April 9, 2014, when the extension was rewritten. Notably, the message displayed on the top of the special page is now called Multiupload-text, no longer Multipleupload-text. Some of the older extension messages no longer exist.

You can change the messages of this extension through pages of MediaWiki namespace starting with multipleupload. For example, [[MediaWiki:Multiupload-text]] is the message displayed on MultipleUpload special page.

Other messages are:

multiupload-submit / multiupload-uploadedto / multiupload-row-name-base / multiupload-unpack-button / multiupload-notify-ok / multiupload-upload-package-error / multiupload-unpack-error / multiupload-http-error / multiupload-file-unpacked-from

See also[edit | edit source]