Extension talk:MultiUpload

From MediaWiki.org
Jump to: navigation, search
An archive box Archives 

/Archive 01

Start a new discussion

Contents

Thread titleRepliesLast modified
Does not work with 1.18416:41, 29 January 2012
Select more than one image at a time213:22, 28 December 2011
Show only the first file and up to max403:44, 23 December 2011
Images only!302:53, 18 December 2011
May this extension MultiUpload from other URL?112:11, 9 October 2011
Bug: Name uniqueness is not checked for uploaded files005:47, 23 August 2011

Does not work with 1.18

I have not been able to get this to work with 1.18. No matter how many files I upload, the last one always returns an error that the file is empty (see screenshot). All the files are successfully uploaded and usable, so it seems that a bad result is just being passed somewhere.

Screenshot of Error.
Jlemley17:47, 25 January 2012

Nothing new there. The error message also occurred with MW 1.17 and possibly MW 1.16 as well. You can simply ignore it I think.

Cavila MW 1.17, MySQL 5.5.16, Php 5.3.808:28, 26 January 2012

I've been using this extension successfully with 1.16.5 with no problem. I'm looking to update to 1.18 - I have all the other extensions we use updated and functioning, but not this one.

Yes, the error could be ignored, but it's horribly unprofessional to appear in a corporate document repository. I'm sure I could hack a way to suppress it, but I would rather find a solution that allows the features of MediaWiki to keep working when uploading files.

Jlemley03:42, 29 January 2012

You're absolutely right, of course, and there's some more room for improvement. Unfortunately, User:Tderouin (the creator of this extension) hasn't shown up to comment on this page. In fact, unless someone is prepared to take over from him, the extension does not appear to be maintained any longer. I don't know why so many useful extensions are being neglected by the developing community lately, but maybe slapping an Unmaintained tag could help to ignite some interest.

Cavila MW 1.17, MySQL 5.5.16, Php 5.3.816:37, 29 January 2012

Good idea. Sometimes it might be a good idea too to contact the coder directly. Cheers

[[kgh]]16:41, 29 January 2012
 
 
 
 

Select more than one image at a time

Hi there! MultiUpload is the best upload extension I could find. There is only one thing that I could be improved.... Sometimes I have to upload 40-60 pictures at the same time. Then I have to select them one by one. This is very time consuming. I found this other extension, called Uploadify. It seems like the extension had this feature but it is not working anymore. Is it possible to add this feature to MultiUpload? Thanks for your answers in advance!

C.eiermann05:21, 27 December 2011

You're right, it's a pity that no adequate solution has been found for what seems like a basic need for many users. For similar functionality, there is Extension:SpecialMultiUploadViaZip, but it was last updated in 2007, so not very likely to work with current versions of MW (correct me if I'm wrong though). I don't know about Extension:UploadWizard, which requires ImageMagick and I don't have shell access to install it.

Cavila MW 1.17, MySQL 5.5.16, Php 5.3.812:03, 27 December 2011

Extension:UploadWizard can do that meanwhile. I just checked it on the example website. Looks good.

Subfader13:21, 28 December 2011
 
 

Show only the first file and up to max

Edited by another user.
Last edit: 20:14, 14 December 2011

Just add the below to multiupload.js and you are ready to go.

// should probably be in i18n
wgAddMoreName = 'Add next file'; // en
//wgAddMoreName = 'Dodaj następny plik'; // pl
/**
 * Enable showing one file at first and add more
 *
 * This will hide all files input but the first one
 * and will add an add more button.
 *
 * @note $wgMaxUploadFiles param sets maximum number of files uploaded at once
 */
function wgUploadHideSetup() {
        var eRows;
        try {
                eRows = document.getElementById( 'mw-htmlform-source' ).getElementsByTagName('tr');
        } catch (e) {
                return;
        }
        if( eRows ) {
                //
                // get rows array
                //
                var arrRows = new Array();
                var iLastRow;
                var oRow = new Object();
                for (var i=0; i<eRows.length; i++) {
                        var e = eRows[i];
                        if (e.className.search(/(^| )mw-htmlform-field-UploadSourceField( |$)/)>=0) {
                                oRow.rIn = e;
                                iLastRow = i;
                        } else if (e.className.search(/(^| )mw-htmlform-field-HTMLTextField( |$)/)>=0) {
                                oRow.rOut = e;
                                iLastRow = i;
                                arrRows.push(oRow);
                                oRow = new Object();
                        }
                }
 
                if (arrRows.length <= 0)
                {
                        if (typeof(console) != 'undefined' && typeof(console.log) == 'function')
                        {
                                console.log ('wgUploadHideSetup: no form fields found - class name changed?');
                        }
                        return;
                }
 
                //
                // hide all but first
                //
                var strRowNormalDisplay = arrRows[0].rIn.style.display;
                for (var i=1; i<arrRows.length; i++) {
                        arrRows[i].rIn.style.display = 'none';
                        arrRows[i].rOut.style.display = 'none';
                }
 
                //
                // add button
                //
                // cells
                var nel = document.createElement('tr');
                var nelTd = document.createElement('td');
                nel.appendChild(nelTd);
                nelTd = document.createElement('td');
                nel.appendChild(nelTd);
                // the button
                var nelInp = document.createElement('input');
                nelInp.setAttribute('type', 'button');
                var lastVisible = 0;
                nelInp.onclick = function () {
                        if (lastVisible<arrRows.length-1) {
                                lastVisible++;
                                arrRows[lastVisible].rIn.style.display = strRowNormalDisplay;
                                arrRows[lastVisible].rOut.style.display = strRowNormalDisplay;
                        }
                        if (lastVisible>=arrRows.length-1) {
                                this.style.display = 'none';
                        }
                }
                nelInp.value = wgAddMoreName;
                nelTd.appendChild(nelInp);
                if (iLastRow == eRows.length-1) {
                        eRows[iLastRow].parentNode.appendChild(nel);
                } else {
                        eRows[iLastRow+1].parentNode.insertBefore(nel, eRows[iLastRow+1]);
                }
        }
}
addOnloadHook( wgUploadHideSetup );

Regards,

--Nux 15:00, 19 January 2011 (UTC)05:46, 23 August 2011

Just edited (added the hide-setup function behind the normal setup) multiupload.js but did not affected anything. I still have my maxupload fields (I use default which is 5- therfore not explicit value in wgMaxUpload in LocalSettings). I wanted to try that to see if i can get rid of the warnings in case you only upload one and not the max number allowed.

Is adding the function to multiupload.js the really the only thing to do?

AW09:28, 28 November 2011
 

I must be missing something here. I appended the above code to the end of the .js but I didn't see what apparently is working... am I supposed to search and replace? Or is there a specific line it should be inserted at?

Teststudent21:08, 11 December 2011
 

Fixed above. As seems HTML changed. And yes - you just paste the code at the end of "multiupload.js" (this is AFTER `addOnloadHook( wgUploadSetup );`).

--Nux 20:19, 14 December 2011 (UTC)20:19, 14 December 2011

Excellent, it works! Thx.

Teststudent03:44, 23 December 2011
 
 

Images only!

Edited by author.
Last edit: 02:53, 18 December 2011

I am trying to import files other than images (pdf, for example). This extension places everything in /images by default.

1) How can I place files in somewhere else?

2) How can I properly link to non-image files? (PDF, etc). Use Media:filename.ext

MKRD info20:02, 8 October 2011

This is not the problem if this extension. See File_upload#Configuring file types and other sections on that help page. --Nux 20:35, 8 October 2011 (UTC)

Nux20:35, 8 October 2011
 

Impossible and epic fail of ancient versions when only images were expected to be uploaded. See Manual:Image Administration. Previously even the namespace was reading "Image:Filename.pdf"... but changing the directory name seems impossible, otherwise it would have happened alrerady.

Subfader02:45, 9 October 2011

Not quite true - you can change the folder: Manual:$wgUploadDirectory. If something won't work for you after changing this (I'm guessing this might happen if you don't start from scratch) then I guess you can create a junction to the old (original) name.

Nux08:05, 9 October 2011
 
 

May this extension MultiUpload from other URL?

I think it's easy, just need to add more URL upload bar.

May be you need to find whether the system use URL upload.

---晒太阳的冰 12:37, 9 May 2011 (UTC)05:48, 23 August 2011

I want bulkupload image by URL too.

116.77.140.6112:11, 9 October 2011
 

Bug: Name uniqueness is not checked for uploaded files

The problem occurs when a user tries to upload multiple files and mistakenly adds one file twice. Then you get a warning that the file already exist, but after uploading other files. Then weird thing happen and notices/warning are thrown at you (if you happen to have notices on in PHP config). Looks like a bug.

--Nux 15:00, 19 January 2011 (UTC)05:47, 23 August 2011
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox