jquery - ajax response is encoded -
i make ajax call
var formdata = new formdata(); formdata.append('name', 'john'); formdata.append('company', 'abc'); $.ajax({ url: url, data: formdata, processdata: false, contenttype: false, success: function(data){ window.location.href = data.url; // data not have url attribute. }, error: function(jqxhr, textstatus, errorthrown){ console.log(jqxhr.responsetext) } });
the server responds excel file.
i can see file in response headers in chrome inspector.
if console.log(jqxhr.responsetext)
can see garbage / encoded data on console. how download data encoded.
it not automatically bring download box expected.
Comments
Post a Comment