works fine in every browser i've checked also instagram browser.
But a solution based on download a blob content does not work on Instagram In-APP (but is working on Chrome, and "regular" browsers).
var url = "file.pdf";
var name = "test";
var opts = "";
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.responseType = 'blob';
xhr.onload = function () {
const blob = new Blob([xhr.response], { type: 'application/pdf' });
saveAs(blob, name);
};
xhr.onerror = function () {
console.error('could not download file');
};
xhr.send();
i've been debugging for a couple of hours and i cant really know what is happening
a solution like:
works fine in every browser i've checked also instagram browser.
But a solution based on download a blob content does not work on Instagram In-APP (but is working on Chrome, and "regular" browsers).
i've been debugging for a couple of hours and i cant really know what is happening
Any idea is welcomed