Hi I’m using the upload file plugin and I need to validate the number of files added before upload the file…Something like this
$('#fileupload').bind('fileuploadadd', function (e, data) {
filestoupload++;
var numOfDivs = $('.request').size();
if (numOfDivs < filestoupload) {
upload = false; // Is just an example.
}
});
This worked for me, on your fileupload definition add a beforesend, and there do the validation
that throw is by far not elegant, if you happend to implement this and find a way to avoid that please make me know (for now is necesary or it will display the error alert for each file uploaded)