I am using the https://github.com/blueimp/jQuery-File-Upload
It uses XHR file uploads in modern browser and hidden iframe uploads in oldIEs (8,9).
The server returns a 4xx status code (error/fail), when file validation failed.
$('#fileupload').fileupload({
url: url,
dataType: 'json',
done: function (e, data) {
console.log("done")
},
fail: function (e, data) {
console.log("fail")
}
})
However in oldIEs the done callback is called even when I send a 4xx status code. Is there a way to make it call the fail callback (https://github.com/blueimp/jQuery-File-Upload/wiki/Options#fail) and read the response body or statuscode?
I think it might have to do something with the hidden iframe method of uploading the files but I couldn't find anything specific in the docs.
I should have checked the Frequently Asked Questions