7

This app is used to collect information from a DB and make a .pdf file from it.

this.reportsService.getTelerikReport({ reportId: this.selectReportId, startDate: this.startDate, endDate: this.endDate, ReportItems: listCheckItems})
        .then(response => {
            this.fileLoading = false;
            var file = new Blob([response], { type: "application/pdf" });
            this.fileUrl = this.$sce.trustAsResourceUrl(URL.createObjectURL(file));
            this.isReportGenerated = true;

I'm receiving an error only in the Microsoft Edge console. A lot of people say it's a security problem with the Edge browser.

Can anyone provide me help for this?

TylerH
  • 20,799
  • 66
  • 75
  • 101
Stefan
  • 157
  • 2
  • 12

1 Answers1

10

The old solution for Microsoft browsers still applies:

if (window.navigator && window.navigator.msSaveOrOpenBlob) {
    window.navigator.msSaveOrOpenBlob(blob);  
}
else {
    var objectUrl = URL.createObjectURL(blob);
    window.open(objectUrl);  
}

Source here

Cezar Crintea
  • 301
  • 4
  • 7
  • 1
    In the latest version of IE11 this property "msSaveOrOpenBlob" doesn't exist anymore. – mirik Aug 07 '19 at 15:46