Yeah, I saw many posts regarding max_file_size and limiting the number of files. Actually, limiting the number of files to the queue is quite simple using something like 'if(uploader.files.length > 2)'.
I did something similar to hide the submit button on my form that includes plupload until all files in the queue have been uploaded:
uploader.bind('UploadProgress', function() {
if(uploader.total.uploaded == uploader.files.length) {
$('#submit').css({'display':'block'});
}
});
Works like a charm for that. For this, what I'd really like to do is bind to the queue size tally. It seems that would be the easiest way since the queue reports total file size already. However, I haven't been successful in identifying which object to reference.
I'm thinking the code should be something similar, like:
var maxQueueSize = 100;
uploader.bind('FilesAdded', function() {
if(uploader.total.queued > maxQueueSize) {
alert('Over disc capacity. Please remove files.'); }
});
Any idea what the correct if statement should be in this case?