FANDOM


This script is for PERSONAL use only!

You are free to install this script for yourself, but it is not allowed to be used wiki-wide (e.g., in MediaWiki:Common.js or MediaWiki:Wikia.js), as it would violate FANDOM's Terms of Use.
(See the customization policy)

MultiUpload is a script similar to MultiUploader but in Javascript that allows you to select multiple files direcly from the open dialog box. You can also change their upload's name and their licence. This tool is available in "My tools" menu in the bottom of the screen for autoconfirmed users. This will lead you to this blank page where the form will be created.

Installation

Add this JavaScript on your wiki:

Global Personal
w:Special:Mypage/global.js Special:Mypage/common.js
importScriptPage('MultiUpload/code.js', 'dev');
importArticles — Best Practices for installing JavaScript on FANDOM
The importArticles statement is designed to combine multiple HTTP requests into a single data transfer, allowing multiple scripts to load and execute faster. If you've been installing several different scripts, your JavaScript file has probably accumulated unnecessary import statements. Click "Expand" to learn how to efficiently batch import scripts to speed up performance and make your code look cleaner. One other approach is by using the MediaWiki:ImportJS.
If your JavaScript file has several lines of code that say importScript, importScriptPage, or importArticles, you may be able to combine them! By batch importing a collection of scripts with a single import, your JavaScript code will load faster and look cleaner. Consider the example below. On the left is an example of what your JavaScript file might currently look like. On the right is how you could improve that code.
Multiple imports — messy and slow One import — clean and efficient
importScriptPage('AjaxRC/code.js','dev');
 
importScript('MediaWiki:localScript.js');
 
importArticle({
  type: 'script',
  article: 'u:dev:FloatingToc/code.js'
});
 
importScriptPage('page1.js', 'wikiname');
 
importScriptPage('page2.js', 'wikiname');
importArticles({
    type: 'script',
    articles: [
        'u:dev:AjaxRC/code.js',
        'MediaWiki:localScript.js',
        'u:dev:FloatingToc/code.js',
        'u:wikiname:page1.js',
        'u:wikiname:page2.js'
    ]
});
Note: In this example, pay close attention to the placement of commas and other punctuation. For people who aren't familiar with programming (and even those who are!), a common mistake when writing code is to accidentally delete, forget, or misplace critical symbols like commas or quotation marks. This can cause a syntax error that breaks the code. Carefully follow the convention shown here when using importArticles.
But there's much more to importArticles than just this! For more examples and advanced usage, see the help page at Help:Including additional JavaScript and CSS.


Usage

When arrived on this blank page, a input file and a button will be shown. Click on the input file to open a window for looking for your files. You can select multiple files with Ctrl or Shift. Then, click on the button. You will see many fields with file name and license. Change the file name and license that you want your file to have while uploading.

Note : To avoid spam, by default, autoconfirmed users are allowed only to upload 20 pictures a time, rollback 30 and sysop 50. If you choose more, they will not be displayed and uploaded. To change this, please refer to the next section.

Then, click on the "Upload button". Your image will be then uploaded, you can see the progress with picture next to fieldset. You can also see if picture have been uploaded successfully or not if you view the icon next to their license.

Customize

To avoid spam and image flood, the number of pictures that can be uploaded a time has been reduced. You can change it by add before the import statements.

var MultiUploadoption = {
  max: 30
};

Then just replace maxgroups by the number of pictures you want to be able to upload a time. Note : This number has to be positive and less than 101. For example, if you want to allow 50 images a time :

var MultiUploadoption = {
  max: 50
};

Default license

By default, in every drop-down license menu, you will have "This will be used in a way that qualifies as fair use under US law". If you want to change it by default :

var MultiUploadoption = {
  max: 30,
  defaultlicence:'CC-BY-SA'
};

If you choose CC-BY-SA, you will have "This is licensed under the Creative Commons Attribution-Share Alike License" by default. To know which value put, go on MediaWiki:Licenses on your wiki or type your language behind like MediaWiki:Licenses/fr for French. Then, put the text before the | of the license by default you want.

Knows issues

While uploading, the browser may be locked as the requests is asynchrous. You will be able to go to others tabs but this one may be locked. It will be unlocked when the requests ends.

All URL encoded are not permitted for example, in textbox, Image-picture.png will fail but Image picture.png will work.

Logs

  • 1 January 2015 : Script published

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.