Problem stated as subject.
Looking at references here and here, I have following code, but it does not work.
My current code:
if (window.navigator.userAgent.toLowerCase().indexOf('crios') > -1) {
var byteCharacters = atob(this.state.base64EncodedPDF);
var byteNumbers = new Array(byteCharacters.length);
for (var i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i);
}
var byteArray = new Uint8Array(byteNumbers);
var blob = new Blob([byteArray], { type: "application/octet-stream" });
var reader = new FileReader();
reader.onload = function () { reader.result; };
reader.readAsDataURL(blob);
return;
What is the problem here?
EDIT
If you wonder what was the error, there was no error. Nothing just happens when I clicked on the download link. Desktop browsers work fine (of course in other IF conditions).