“Access is Denied” when attempting to open a URL generated for a procedurally-generated PDF in IE11

左心房为你撑大大i 提交于 2019-12-05 20:53:54

IE won't allow you to open blobs directly. You have to use msSaveOrOpenBlob. There's also msSaveBlob.

if (window.navigator && window.navigator.msSaveOrOpenBlob) {
    window.navigator.msSaveOrOpenBlob(blob, fileName);
} else {
    var objectUrl = URL.createObjectURL(blob);
    window.open(objectUrl);
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!