Firstly, I tried all questions & answers related this topic. Additionally and I tried related questions and try to solve it but no the success. So please read my question thoroughly.
Search Questions:
Displaying Blob PDF in Edge/IE11
Windows Edge and opening a blob URL
Blob download is not working in IE
I've searched related questions and tried to write the code but not had any success. I work with the PDFJS Project. I have open blob file in new tap. The below code works in all browsers (Chrome, Firefox, IE) but it's not working in Edge. I also use viewer.js
in my project. I want to load my PDF file in Edge browser Microsoft Edge 42.17134.1.0.
var xhr = new XMLHttpRequest();
xhr.open('POST', '/pdfblob.aspx', true);
xhr.responseType = 'blob';
xhr.onload = function (e) {
var url = window.URL.createObjectURL(this.response);
window.open('/web/viewer.html?file=' + url);
};
xhr.send();
This is the error I get: