更新时间:2021-07-01 22:12:01
搜索后,该解决方案似乎在ChromeiOS和Safari上运行良好。我在这个帖子上找到的,";https://***.com/questions/24485077/how-to-open-blob-url-on-chrome-ios?answertab=oldest#tab-top";.这解决了我的问题:
//isbContentType i.e. 'text/plain'
//isbFilename i.e. 'This is a title'
var reader = new FileReader();
reader.onload = function(e) {
var bdata = btoa(reader.result);
var datauri = 'data:' + isbContentType + ';base64,' + bdata;
window.open(datauri);
newWindow = setTimeout(function() {
newWindow.document.title = isbFilename;
}, 10);
};
reader.readAsBinaryString(iobBLOB);
我相信有办法下载Blob文件,但它不是。无论如何,谢谢您