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.

enter image description here

it not automatically bring download box expected.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -