Not allowed to upload blob pdf resource in Microsoft Edge

This application is used to collect information from the database and create 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 only get the error in the Microsoft Edge console. Many say this is a security issue with the Edge browser.

Can anyone help me?

+3


source to share


1 answer


The old Microsoft browser solution still applies:

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

      



Source here

+1


source







All Articles