You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have a scenario, where we need to support to download any kind of file types.
By using angular-file-saver I was able to achieve this, but the downloaded file is always corrupted.
am using 'data:octet/stream;base64'.
Here is my code:
var data = new this.blob([this.studentDocument.documentImage], { type: 'octet/stream;base64' });
Hi,
I have a scenario, where we need to support to download any kind of file types.
By using angular-file-saver I was able to achieve this, but the downloaded file is always corrupted.
am using 'data:octet/stream;base64'.
Here is my code:
var data = new this.blob([this.studentDocument.documentImage], { type: 'octet/stream;base64' });
this.fileSaver.saveAs(data, this.studentDocument.originalFileName);
The same is working if we use href's "download" attribute like below.
But as IE & Edge browsers do not support this "download" attribute, I cannot use this.
$(invisibleLink)
.attr("href", "data:octet/stream;base64," + this.studentDocument.documentImage)
.attr("download", this.studentDocument.originalFileName);
document.body.appendChild(invisibleLink);
invisibleLink.click();
Has anybody has faced this issue?
Thanks
Nirmal
The text was updated successfully, but these errors were encountered: