Open hihl opened 7 years ago
Thanks for have opened this issue cause I've lost an entire day before realizing that my stuff wasn't working because of Fetch. I've substituted it with axios and now everything works perfectly ;)
HI, Before including Xdomain.min.js in the project while fetching the stream(MemoryStream) response from WEB API using ActionResult and then converted that blob data using below code snippet into pdf file format.
var blob = new Blob([res._body], { type: 'application/pdf' });
this.fileUrl = this.sanitizer.bypassSecurityTrustResourceUrl(window.URL.createObjectURL(blob));
if (callingFrom === 'download') {
let element = this.downloadLink.nativeElement;
element.href = this.fileUrl.changingThisBreaksApplicationSecurity;
element.click();
}
Once I include Xdomain plugin in the project to fix CORS issue stream response is getting junk like below:
Please help me in this It's taking time but coundn't find any solution. Please respond AQAP.
Thanks in advance.
I have this question too