I am trying to upload a file to a remote server. My request is not hitting there correctly and I see the Status as (canceled) in the network. I dont see my datas are passing in the network. PFB the abstract code
xhr = new XMLHttpRequest();
if (xhr) {
xhr.open("POST", url);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
///do blah blah
}
};
}
var form = new FormData();
form.append("tpiFiles", fileData);
form.append("COOKIE", 'COOKIE=' + $.cookie('COOKIE'));
xhr.send(form);
All helps are much appreciated.
Thanks