navigator.msSaveBlob function is not working in IE11

♀尐吖头ヾ 提交于 2021-02-07 21:27:52

问题


I have used msSaveBlob() command to download a CSV file. I am facing an issue although navigate.msSaveBlob() is returning true, and there are no errors on console. I am being prompted that

File Couldn't be downloaded. Retry or Cancel.

I am working on IE11, and OS is Windows Server 2012 R2. I also tried updating IE, but it is still not working.

I also tried the samples from MSDN, but facing the same issue. Kindly suggest me how to resolve this issue.

Code Snippet:

var blob = new Blob(["Sample String\r\n,For Checking, msSaveBlob"],{
    type:'text/csv;charset=utf-8;'
});

if(navigator.msSaveBlob){
    navigator.msSaveBlob(blob,"sample.csv");
}

回答1:


I have exactly the same issue and we found this.

Basically is a problem with user permissions to the temp folder on the IE. Because in some computers happen and others don't. So, I changed the folder on "Internet options" > General > settings > temporary internet files > move folder, and here I've chosen a folder with all the permissions active.



来源:https://stackoverflow.com/questions/35194359/navigator-mssaveblob-function-is-not-working-in-ie11

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!