2

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

Prats
  • 1,745
  • 4
  • 24
  • 28
  • 1
    This is probably due to cross domain requests, am i right? – haim770 May 09 '13 at 13:02
  • Check x-domain requests as stated by haim770, also request-length may be an issue (eg. file to upload is too big): in this case you should check the application server settings on remote server. – LittleSweetSeas May 09 '13 at 13:39
  • Similar to http://stackoverflow.com/questions/12009423/what-does-status-canceled-for-a-resource-mean-in-chrome-developer-tools ? – Abhinav Singi Mar 10 '16 at 10:28

0 Answers0