Failed to execute ‘createObjectURL‘ on ‘URL‘ Overload resolution failed
vue使用二进制流下载文件,使用link.href = window.URL.createObjectURL(blob);报错:Failed to execute ‘createObjectURL’ on ‘URL’: Overload resolution failed.百度了下,是因为Chrome更新后不支持这种用法,需要改为:let binaryData = [];binaryData.pu
·
vue使用二进制流下载文件,使用
link.href = window.URL.createObjectURL(blob);
报错:
Failed to execute ‘createObjectURL’ on ‘URL’: Overload resolution failed.
百度了下,是因为Chrome更新后不支持这种用法,需要改为:
let binaryData = [];
binaryData.push(blob);
link.href = window.URL.createObjectURL(new Blob(binaryData));
更多推荐
已为社区贡献2条内容
所有评论(0)