Extension talk:MultiUpload/LQT Archive 1

How can I change Summary from Field to Text Area?
Like "Special:Upload", I want to have summery text boxes with multiple lines. A text area rather than a field like in "Special:MultipleUpload". I would like this to be three lines, this will make my adding process easier when I'm modifying summary fields on multiple lines. Does anyone know a way that I can make these modifications?

I assume I have to change

Line 212 $wgOut->addHTML(" mFileIndex}' value=\"" . htmlspecialchars( $this->mUploadDescription ) . "\" />");

Line 368 mComment ). "\" size=25>

But I don't know what to change it too?

Thanks! --121.91.2.196 13:51, 10 October 2008 (UTC)

Removing 'upload links' from Tools sidebar
Great extension. But, I have one question. I have moved the Upload Files link to the Navigation sidebar rather than the Tools sidebar. This is because I am using another extension that personalizes that sidebar on a per-user basis and I have limited uploads on a per-user basis as well. Now, only those folks with Upload perms see the link to the Multiple Upload on the upper Navigation sidebar page when they log in. The question then is: Where do I do to remove the two links in the Tools sidebar below? One appeared there after installing the extension and the other is the original link. Thanks! Qaaz

Improvements
This extensions seems quite useful. Nice work! A few suggestions for improvements : --Morten Blaabjerg 13:59, 31 January 2007 (UTC)
 * Allow for full customizability & multilingual support - i.e. no text messages in the php file itself - but everything in the database
 * Allow for user to specify how many uploads are needed
 * Allow user to specify the same description/summary for all uploads (checkbox)

Looks nice, but the source seems to be offline at the moment. I would like to see a batch upload via a multi-select box.24.177.55.8 23:42, 20 February 2007 (UTC)

I don't think it works on the latest version of Mediawiki 1.9.3...I get an error (unexpected T_Require_Once) error when requiring it. --66.31.65.129 02:20, 13 April 2007 (UTC)

Guys...stupid question...how do you actually use this extension in a Wiki page ? tried writing  and several other combinations, but they were not interpreted by Wiki (in other words, it didn;t work :p). Can anybody shed some light ? thanks :) --86.121.11.70 00:51, 10 May 2007 (UTC)
 * in the 'search' field enter Special:MultipleUpload .. should work --Dtsig 16:02, 7 June 2007 (UTC)
 * or edit MediaWiki:Sidebar: add . Great extension BTW, thanks to the author! --86.59.60.209 21:51, 18 July 2007 (UTC)

How to replace 'Upload file' with ' Upload files' in the Toolbox menu?
Any suggestions on how to replace 'Upload file' with ' Upload files' in the Toolbox menu? I would like to use MultiUpload by default, but I see no way to edit the toolbox. Thanks.

Michiel (wientjes.org)

This probably isn't the best way, but if you edit LocalSettings.php and add the line: $wgUploadNavigationUrl = '/index.php/Special:MultipleUpload'; That should alter the "Upload file" URL to point at the right special page. If you look in languages/messages/MessagesEn.php you should fine a couple of entries which use the text "Upload file", I think one is for the Toolbox link and the other is for the form button. Changing this text to "Upload files" seems to do the trick. Note that this will also change the text on the button used on the Special:Upload page too.

Adam (www.appendixv.org)

SVN Problems
When trying to d/l, I get: $ svn co http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/MultiUpload svn: PROPFIND request failed on '/viewvc/mediawiki/trunk/extensions/MultiUpload' svn: PROPFIND of '/viewvc/mediawiki/trunk/extensions/MultiUpload': 301 Moved (http://svn.wikimedia.org)


 * You need to change "viewvc" to "svnroot". I know the error is not that helpful, and on some systems the same URL works both for the browser and svn because it gets redirected according to the type of client.86.27.137.201 10:23, 20 October 2007 (UTC)

Upload Files from URL
Does anyone know how easy it would be to retrofit an Upload form like this to accept input in the form of online images or other files (ie, http://example.com/image.jpg)? -Blckdmnd99 17:40, 29 August 2007 (UTC)

Suggested modification
I've modified MultiUpload so that it refers to a wiki message called "MediaWiki:Multiuploadtext", so that the end user can easily modify the text block before the upload fields without touching the actual extension.

Basically, at line 43 of the extension change 'multipleuploadtext' to read:

For examples, see:


 * http://media.battlestarwiki.org/wiki/MediaWiki:Multiuploadtext (for the text)
 * http://media.battlestarwiki.org/wiki/Special:MultipleUpload (for how it looks on the file)

Let me know what everyone's thoughts are. -- Joe Beaudoin Jr. 23:05, 30 August 2007 (UTC)

Does not work on 1.11
Just an FYI, this extension does not work properly on 1.11. You'll just be returned to the Special:MultiUpload page, which repeats itself (i.e. if you try to upload five items, you get five forms, with one item per form). -- Joe Beaudoin Jr. 22:49, 5 October 2007 (UTC)


 * i would not generalize this, because i am also running wiki 1.11 and this extensions works fine since i changed the line in SpecialUpload.php as explained from the installation-page. Probably the extention interfers with some other from you wiki.
 * kind regards -- Turbo''Kanne 20:53, 10 February 2008.


 * Now i updated my wiki to version 1.12 and the extension still does work quite well, only thing that currently do not work anymore is changing the filename and adding comments on the uploaded files. does anyone have a clue why this does not work with this extension?
 * kind regards -- Turbo''Kanne 21:34, 19 May 2008 (UTC)
 * ok, i just found the 34918, do not know if this works to solve my issues but will test it as soon as possible and give a feedback. zhanks anyway.
 * regards Turbo''Kanne 21:44, 19 May 2008 (UTC)


 * After testing this 34918 it now works absolutely perfect !
 * thanks for this very useful extension
 * regards
 * --TurboKanne 08:41, 20 May 2008 (UTC)


 * same issue for me using revision 1.11.0, followed all instructions on http://www.mediawiki.org/wiki/Extension:MultiUpload
 * but getting same result as Joe Beaudoin.
 * In addition I am getting error message 'The file you uploaded seems to be empty. This might be due to a typo in the file name. Please check whether you really want to upload this file.' even though file size is not 0 and i checked 'Ignore warnings' check box. Help please !!
 * --Aditi 02:03, 02 Oct 2008 (PDT)

PHP warnings about allow_call_time_pass_reference
This is a good extension. I found it made PHP5 give a warning on my hosting setup about php allow_call_time_pass_reference. This is a non-fatal warning, so I used ini_set to modify the error reporting and hide the error. I added this to LocalSettings.php: ini_set('error_reporting', E_ERROR); This still reports errors, but hides warnings. --Rob 09:10, 27 October 2007 (UTC)

Same here! Ditto.

Error: You have requested an invalid special page.
At our site, www.afterwiki.info I have upgraded from mediawiki 1.6 to the latest version (1.11 I believe). When I had done that, the multiple upload extension didn't work anymore. I get the message above, "[you have requested an invalid special page]".

Also it can have something to do with allowed uploads, I disabled uploading .png files and enabled .pdf files.

Anybody got any ideas how to fix this?

Fatal error: Call to undefined function (mw1.9.3)
Fatal error: Call to undefined function wfLoadExtensionMessages in /var/www/mediawiki-1.9.3/extensions/MultiUpload/SpecialMultipleUpload.php on line 37

This error was received once extension was added. Can someone please assist.
 * I am getting this same error. I can get things to work by commenting out line 37, but my messages are coming out very odd, like it's expanding the lt; and gt; tags rather than parsing them to "<" and ">". --Elonka 21:03, 24 November 2007 (UTC)
 * Same error here, using MW1.6.10 - Bernardo Maciel


 * That is because  function was added in MW 1.10 (or 1.11, can't remember exactly). Either you should try an older version of MultiUpload extension or then do the better solution and upgrade your MediaWiki, if possible. -- Sayuri  11:31, 6 March 2008 (UTC)
 * --TDeeming 13:02, 13 May 2008 (UTC) Hi, I am having the same problem. Where can I find older versions of the extension???

possible bugs - 29805
Hi Travis -

I really like your MediaWiki MultiUpload Extension (http://www.mediawiki.org/wiki/Extension:MultiUpload). I'm glad and thankful that you updated it for MediaWiki 1.11.x.

However, I'm presently having two problems using revision 29805 that are preventing me from deploying it: filename" it doesn't ever apply the destination filename. Instead the file is always uploaded with the source filename.
 * Whenever I set a "Destination filename" that differs from the "Source
 * it can be fixed in easy way, just find those two lines:

$this->mDestFile = $this->mDestFileArray [$x]; $this->mUploadDescription = $this->mUploadDescriptionArray [$x];


 * ...and replace with:

$this->mDesiredDestName = $this->mDestFileArray [$x]; $this->mComment = $this->mUploadDescriptionArray [$x];


 * second line is actually fix for another issue: adding comment to the image.
 * ADi3ek 12:10, 11 April 2008 (UTC)


 * Fixed in 34918. -- Sayuri 12:40, 16 May 2008 (UTC)

whenever you try to upload a file with a filename that already exists. Your extension doesn't give a warning, but just overwrites the pre-existing file and the user doesn't even know that they overwrote someone else's file.
 * The built-in MediaWiki single file upload tool gives a warning

Other than that it's great. Many thanks

destroys my wiki
Tried installing this plugin, but every page on my wiki gets overwritten by the contents of SpecialMultipleUpload.php. I have the latest version of mediawiki as of Feb 26th 2008. --64.142.49.14 19:51, 26 February 2008 (UTC)
 * Don't use the extension... it does not work on the newest version (1.11.x), which is what you're using. -- Joe Beaudoin Jr. 02:17, 27 February 2008 (UTC)


 * Works well with my MW v1.11.1 (tested SpecialMultipleUpload.php rev 29805 & 30949) and do the hack in includes/SpecialUpload.php. --Vonloschz 14:19, 28 February 2008 (UTC)


 * Destroys my wiki too (v1.12.0). Followed the directions but this shows up:

[mediawiki] / trunk / extensions / MultiUpload / SpecialMultipleUpload.i18n.php 	Repository: mediawikimysqlpywikipedia ViewVC logotype Log of /trunk/extensions/MultiUpload/SpecialMultipleUpload.i18n.php

Parent Directory Parent Directory Links to HEAD: 	(view) (download) (as text) (annotate) Sticky Revision: Revision 32720 - (view) (download) (as text) (annotate) - [select for diffs] Modified Wed Apr 2 18:19:05 2008 UTC (22 hours, 46 minutes ago) by siebrand File length: 27080 byte(s) Diff to previous 32575

Localisation updates for extension messages from Betawiki (2008-04-02 19:39 CEST)

Revision 32575 - (view) (download) (as text) (annotate) - [select for diffs] Modified Sat Mar 29 21:38:49 2008 UTC (4 days, 19 hours ago) by siebrand File length: 26724 byte(s) Diff to previous 32515 --Mmagroup 23:46, 3 April 2008 (UTC)
 * I don't think you installed the correct files. Make sure you download the actual .php files.  On the line:

Links to HEAD: 	(view) (download) (as text) (annotate)

you have to click the download button (from the svn link on this page). -- 24.57.138.141 21:28, 4 May 2008 (UTC)

This extension is working perfectly on my installation of MW 1.13.2 --BusNut 17:31, 8 October 2008 (UTC)

Suggestion: Add Image Names to Result Page
First, this is a totally useful extension, Thanks!

After uploading a file, it is very convenient to have the filename of the image visible on the results page. That way, I can copy and paste the image into the wiki page I'm writing

Right now, after uploading, the results page reads: Upload files (thumbnail of image 1) File uploaded. (thumbnail of image 2) File uploaded. (thumbnail of image 3) File uploaded.

I'd love to see something like this: Upload files (thumbnail of image 1) Image:image_1.jpg File uploaded successfully (thumbnail of image 2) Image:image_2.jpg File uploaded successfully (thumbnail of image 3) Image:image_3.jpg File uploaded successfully

If you were feeling really bold, an option on Localsettings.php would let you specify prefixes and suffixes to the image name. So you could do something like this: $MultiUploadPrefix = "[[Image:"; $MultiUploadSuffix = "|thumb]]";

That could give you a result like this: Upload files (thumbnail of image 1) File uploaded successfully (thumbnail of image 2) File uploaded successfully (thumbnail of image 3) File uploaded successfully And -that- would rock my mediawiki uploading world! --Gadlen 00:21, 22 March 2008 (UTC)

I would also love to see "Image:Image_name.jpg" shown after upload for easy copy and pasting! -- Hyo-Son

White Screen of Death
When I add the line, my whole wiki disappears. I just get a white page. Can anyone give me any suggestions about what's going on?
 * Check your logs to see if you're getting any php errors. -- 24.57.138.141 21:25, 4 May 2008 (UTC)

PHP error
I think I installed the extenson right, but as I know nearly nothing about php and programming, it's hard for me to understand the problem. When I add require_once($IP.'/extensions/MultiUpload/SpecialMultipleUpload.php'); to LocalSettings.php, I get a white page with only :

Warning: require_once(SpecialUpload.php) [function.require-once]: failed to open stream: No such file or directory in /mnt/163/sda/3/4/zob/wiki/extensions/MultiUpload/SpecialMultipleUpload.php on line 49

Fatal error: require_once [function.require]: Failed opening required 'SpecialUpload.php' (include_path='/mnt/163/sda/3/4/zob/include:.:/usr/php5/lib/php') in /mnt/163/sda/3/4/zob/wiki/extensions/MultiUpload/SpecialMultipleUpload.php on line 49

I then tried to open SpecialMultipleUpload.php, to find that it actually needed SpecialUpload.php to be inside the MultiUpload directory. I copied it there and it seems to work, only it seems weird that I am the only one to get this and besides it seems very "unclean"... I use MediaWiki 1.12.0. Is it only a matter of relative links ? 81.57.150.51 16:24, 3 June 2008 (UTC)


 * No, this extension does not need SpecialUpload.php to be in MultiUpload directory. Most likely there's a problem with your setup. Check your PHP configuration (php.ini) to see if the root cause of the problem can be found there. The SVN revision of MultiUpload works well for me under 1.12.0 and 1.13alpha. -- Sayuri 21:15, 5 June 2008 (UTC)


 * It's probably worth noting that the latest version of MediaWiki puts the Special*.php files in $IP/includes/specials instead of in the normal includes directory. You can either setup a symbolic link from includes/SpecialUpload.php to point to includes/specials/SpecialUpload.php or just edit the MultiUpload.php file and change require_once 'SpecialUpload.php'; to require_once 'specials/SpecialUpload.php'; --N0ctrnl 20:30, 12 December 2008 (UTC)

Class 'UploadForm' not found
Every wiki page throws Fatal error: Class 'UploadForm' not found in /extensions/MultiUpload/SpecialMultipleUpload.php on line 59 on 1.13a (r35965). --Tgr 07:26, 17 June 2008 (UTC)

This change seems to be the problem, it works fine if require_once 'SpecialUpload.php'; is added back. --Tgr 07:36, 17 June 2008 (UTC)


 * This happened to me on 1.12.0, and adding that line back fixed it for me as well. 97.115.69.127 02:28, 26 June 2008 (UTC) (taylor [@] lingnik.com)


 * Experienced the same issue, this line fixed it (MW1.12) (levibuzolic [at] gmail.com) --121.209.148.249 11:54, 12 July 2008 (UTC)


 * Same issue, same fix (MW1.12) (Yves Christophe) -- 193.190.144.15 08:53, 15 July 2008 (UTC)

Suggestion
Hello,

It's a very useful extension. For a better estheticism you could add this line

in SpecialMultipleUpload.php.

Respects,

Louperivois 00:51, 10 July 2008 (UTC)

How make it visible for sysops only?
Great plugin! But I want to set access that only users with sysop rights can use it. How can I do that? Thank you. Regards, Alex. -- 212.152.50.21 21:04, 7 November 2008 (UTC)

File exists check
As mentioned before this year, it's a mega bug that it overwrites existing files without a warning. Can't use it with this bug. Could someone fix it?On the "Upload files" page there could be a simple message below the ok files: "File: X - Filename exists" (with a link to it). Maybe even an option to reupload it with a new destination name. --Subfader 13:43, 13 December 2008 (UTC)


 * Just changed statuts from stable to experimental with a warning on top. Who knows how secure this is compared to Special:Upload! I don't trust it. --Subfader 17:51, 12 February 2009 (UTC)

File is Empty Error
When uploading I receive the error "File is Empty" for every single file, regardless of extension. I am using MW version 1.11.0

Exact error: Het bestand dat u heeft geüpload lijkt leeg te zijn. Dit zou kunnen komen door een typefout in de bestandsnaam. Ga a.u.b. na of u dit bestand werkelijk bedoelde te uploaden. Translation: The file that you have uploaded appears to be empty. This can be because of a typo in the filename. Please check if this is the file you meant to upload.

Sidearm 17:16, 22 December 2008 (UTC)

Spanish translation
The Spanish translation was not available. If anyone needs it here it is:

/** Spanish (Español) * @author Diego Gómez */ $messages['es'] = array(	'multipleupload'                  => "Subir archivos",	'multipleupload-desc'              => 'Permite a los usuarios subir varios archivos a la vez',	'multipleupload-ignoreallwarnings' => "Ignorar todas las advertencias y guardar los archivos de todos modos.",	'multipleupload-saveallfiles'      => "Guardar todos los archivos",	'multipleupload-addresswarnings'   => "Por favor, antes de abordar cualquier advertencia vuelva a cargar los archivos.",	'multipleupload-page'              => "    :política de borrado.",	'multipleupload-text'              => "Subir varios archivos a la vez.

Haga clic en Examinar y seleccione cada uno de los archivos que desea subir. Puede subir desde 1 hasta $1 archivos al tiempo.

También puede introducir información sobre el Nombre del archivo de destino y proveer una Descripción si lo desea.

Archivos inapropiados serán borrados inmediatamente, consulte la |política de borrado.",	'multiupload-fileuploaded'        => "Archivo subido correctamente.",	'multiupload-toolbox'              => "Subir varios archivos.", );

Bug fixes in progress
I'm currently working on bug fixes for this extension at the moment and should have a more reliable version of the extension ready next week. Thanks.

--Tderouin 17:09, 16 April 2009 (UTC)


 * Good to see some progress. Please fix the "check if the target filename exists" and the odd multiple appearence of the link in the sidebar. --Subfader 12:50, 17 April 2009 (UTC)


 * Bug fixes are in. Warnings are dealt with and exiting files are not overwritten unless the user requests it. I'm not aware of any bugs about the sidebar, can you point me in the right direction? --Tderouin 14:34, 21 April 2009 (UTC)


 * Can't patch SpecialUpload.php manually. Also, would it be possible to have a summary field for all and a a field for "base name template" for the destination filename? See my thought on bugzilla --Subfader 15:56, 23 April 2009 (UTC)
 * Can you provide more info on not being able to patch SpecialUpload.php? --Tderouin 16:24, 23 April 2009 (UTC)
 * No patch needed. See here. Works. --Subfader 16:53, 29 April 2009 (UTC)

If really no patch is needed, please revise the sentence on the extension installation documentation, saying: "Patch SpecialUpload.php. Copy mediawiki-1.14.0.patch to your base mediawiki installation directory and run patch -p0 < mediawiki-1.14.0.patch" --G.Hagedorn 22:09, 16 May 2009 (UTC)

New version improvements
The new version works fine ;) But can I suggest some improvements? I stated those thoughts more clearly on bugzilla. --Subfader 16:53, 29 April 2009 (UTC)

Duplicate selection
If you select the same file twice in the upload form an ugly and hard to understand error page returns trying to display the duplicate file (which is not uploaded yet at this point). Better display: "You selected Filename.ext twice. Do you want to ignore the second upload of it? Return to form?". --Subfader 16:53, 29 April 2009 (UTC)

Uploads finished
After the uploads are done you're left with a blank page. Better list the page links to all files. --Subfader 16:53, 29 April 2009 (UTC)

I agree. Also, if the upload fails (perhaps due to timeouts ) there is no feedback, it simply returns the empty form. --G.Hagedorn 22:01, 16 May 2009 (UTC)

Single summary for all
Add a larger textarea at the end so you can add a single summary for all files. On Special:Upload I use the summary textarea for easy categorization via a custom toolbar, so be sure to give the textarea the id="wpTextbox1". --Subfader 16:53, 29 April 2009 (UTC)

Field for destination basename
On top add an inputbox for using a basename for the destination names. If used, don't insert the filenames after selcting a new file. Example for uploading 3 images: As basename insert "File series". In the single destination fields enter "1", "2", "3". The final filenames are: --Subfader 16:53, 29 April 2009 (UTC)
 * File series - 1.jpg
 * File series - 2.jpg
 * File series - 3.jpg

URL uploads
If $wgAllowCopyUploads = true then it should offer inputs for the URLs just like Special:Upload. For not destroying page view it might be best to switch between the modes using links to "upload from URL" and "upload local files". It might also be useful to have a textarea where you can paste a bunch of URLs which are then added to the input boxes to genereate the destination filenames. --Subfader 22:59, 29 May 2009 (UTC)

Bugs
When you tick "Ignore any warnings" an sql error is returned. Plurals: The checkbox for "Watch this page" should get an own mw message and the submit button shouldn't use the standard Upload message but the existing (!) multipleupload ("Upload files") ;) --20:49, 28 May 2009 (UTC)

Error in MW 1.14
Hi. I really want to put this for my brand new website. The Special:MultipleUpload page came out nicely, but I got this error after uploading a file: Fatal error: Call to a member function getUrl on a non-object in /opt/lampp/htdocs/wiki.lan/wiki/includes/filerepo/Image.php on line 72

Please help.

Note:
 * The /opt/lampp/htdocs/wiki.lan is the webroot directory of this installment.
 * Using mediawiki 1.14.0, patch applied as instructed


 * Some thought, I applied the short URL Tricks . Maybe this is the culprit.