Hi,
I am using the basic demo and have disabled the auto start upload in handlers.js and added a "Start Upload" button.
I would like the button to be disabled until there are 12 files in the queue.
So far I have removed the Cancel button and changed the ref to startButtonId. This disables the start button if there are 0 files in the queue and activates it once a file has been added.
I have tried changing:
if (numFilesSelected > 0) {
document.getElementById(this.customSettings.startButtonId).disabled = false;
}
to:
if (numFilesSelected > 11) {
document.getElementById(this.customSettings.startButtonId).disabled = false;
}
With this code the button stays disabled all the time. Can someone point me in the right direction?
October 12, 2009 - 11:49am
The value numFilesSelected indicates the number of files selected that time. It is not the number of files in the queue.
For that you can use the third parameter: http://demo.swfupload.org/Documentation/#fileDialogComplete
or you can call getStats() to get the total number of files queued.
February 4, 2010 - 1:08pm
Hello,
How you have managed to add an additional Start Button so that the upload will only start on that button push and not automatically?