خرید بک لینک

Vote count: 0

I am using xhr to make a call to server and it retus a blob. have set the respnoseType='blob' and it all works fine in chrome and firefox even in ie10+ but doesn't work in safari.

if (navigator.appVersion.toString().indexOf('.NET') > 0) {
window.navigator.msSaveBlob(blob, fileName); } else { var downloadUrl = URL.createObjectURL(blob);
var a = document.createElement("a");
a.href = downloadUrl;
a.download = fileName;
document.body.appendChild(a);
a.click();}

what is the right way to do this, as this looks like a hack!.

asked 33 secs ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 11 تير 1395 ساعت: 9:03

صفحه بندی