i use ajax to upload multiple file.user can upload multiple file in the same time.how i can abort ajax only for one uploading file? this is ajax :
areq=$.ajax({
url: $(this).attr('action'),
xhr: function() { // custom xhr (is the best)
var xhr = new XMLHttpRequest();
//load
xhr.upload.addEventListener("load", function(evt) {
$("#msg").text('success !' );
}, false);
//error
xhr.upload.addEventListener("error", function(evt) {
// show progress like example
$("#msg").text('error !' );
}, false);
//abort
xhr.upload.addEventListener("abort", function(evt) {
$("#msg").text('abort !' );
}, false);
return xhr;
},
type: 'post',
processData: false,
contentType: false,
data: fd,
success: function(data) {
// do something...
}
});