1

(3 replies, posted in Core API)

I've written a reply in SO. Have a look at this fiddle and see if it helps. There's more details on your post there.

http://jsfiddle.net/osullivanja/4mghej6t/

This might be what you're looking for. When the user clicks the start-upload link, you can check the file length that Davit mentioned.

document.getElementById('start-upload').onclick = function () {
        if (uploader.files.length < 5) {
document.getElementById('console').innerHTML = 'You need to add 5 files before you can start uploading';
            return false; 
        }
        else{
            uploader.start();
        }
    };

3

(16 replies, posted in General discussion)

Very nice FAQ. It's come in very handy. I especially appreciate the error messages list.

I was wondering about this one:

Runtime will try to detect if image is proper one. Otherwise will throw this error.
code: -700
message:

I may be way off here but to me this sounds like if the user tries to upload a jpg, that isn't a valid jpg, it will throw this error.

The way I was trying to test this was to rename a .html file to .jpg and tried to add it to the file list.
I got an error in moxie.min.js while debugging (t.ImageError.WRONG_FORMAT) but it didn't throw error 700 in plupload and the file was added to the queue regardless.
It may not suppose to work this way but it would be a very neat thing if it could be caught.

For example, if a filter is in place to only allow images, a savvy user could change the extension of his file to jpeg and still upload it, even though it wouldn't be a valid jpeg.