I\'m using Blueimp jQuery file upload plugin for upload files.
I had no problem in uploading but the option maxFileSize and acceptFileTypes
You should include jquery.fileupload-process.js and jquery.fileupload-validate.js to make it work.
Then...
$(this).fileupload({
// ...
processfail: function (e, data) {
data.files.forEach(function(file){
if (file.error) {
self.$errorMessage.html(file.error);
return false;
}
});
},
//...
}
processfail callback is launched after a validation fail.