Fandom Developers Wiki
mNo edit summary
mNo edit summary
Line 1: Line 1:
 
{{Languages}}
 
{{Personal}}
 
{{Personal}}
 
{{Infobox JavaScript
 
{{Infobox JavaScript
| Image file = MultiUpload.png|260px
+
| Image file = MultiUpload.png|260px
 
| Description = Allows you to select multiple files directly on the open box and upload them.
 
| Description = Allows you to select multiple files directly on the open box and upload them.
  +
| Scope = p
| Author = [[User:Gguigui1|Gguigui1]]
 
  +
| Status = Stable
| Code = [[MediaWiki:MultiUpload/code.js|code.js]]
 
 
| Author = [[User:Gguigui1|Gguigui1]]
| Languages = auto
 
 
| Code = [[MediaWiki:MultiUpload/code.js|code.js]]
  +
| Languages = auto
 
}}
 
}}
 
'''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 [{{FULLURL:Special:BlankPage|blankspecial=MultiUpload}} this blank page] where the form will be created.
 
'''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 [{{FULLURL:Special:BlankPage|blankspecial=MultiUpload}} this blank page] where the form will be created.
Line 22: Line 25:
   
 
== Customize ==
 
== 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.
 
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.
  +
<syntaxhighlight lang="javascript">
<pre>
 
 
var MultiUploadoption = {
 
var MultiUploadoption = {
 
max: 30
 
max: 30
 
};
 
};
  +
</syntaxhighlight>
</pre>
 
 
Then just replace <code>maxgroups</code> 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.
 
Then just replace <code>maxgroups</code> 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 :
 
For example, if you want to allow 50 images a time :
  +
<syntaxhighlight lang="javascript">
<pre>
 
 
var MultiUploadoption = {
 
var MultiUploadoption = {
 
max: 50
 
max: 50
 
};
 
};
  +
</syntaxhighlight>
</pre>
 
  +
 
=== Default license ===
 
=== 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 :
 
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 :
  +
<syntaxhighlight lang="javascript">
<pre>
 
 
var MultiUploadoption = {
 
var MultiUploadoption = {
 
max: 30,
 
max: 30,
 
defaultlicence:'CC-BY-SA'
 
defaultlicence:'CC-BY-SA'
 
};
 
};
  +
</syntaxhighlight>
</pre>
 
 
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 <code>|</code> of the license by default you want.
 
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 <code>|</code> of the license by default you want.
   
 
== Knows issues ==
 
== 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.
 
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.
   
Line 54: Line 55:
   
 
== Logs ==
 
== Logs ==
*1 January 2015 : Script published
+
* 1 January 2015 : Script published

Revision as of 06:26, 25 August 2018

This script/stylesheet is for PERSONAL use only!

You are free to install this script/stylesheet for yourself, but it is not allowed to be used wiki-wide (e.g., in MediaWiki:ImportJS, MediaWiki:Common.js, MediaWiki:Common.css, MediaWiki:Fandomdesktop.js or MediaWiki:Fandomdesktop.css), 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.

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