Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': Overload resolution failed.
时间: 2023-10-29 08:04:36 浏览: 316
根据引用、和的内容,你遇到了一个错误:Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': Overload resolution failed. 这个错误通常是由于Chrome更新后不再支持之前的createObjectURL用法所引起的。
根据引用中的解释,你可以尝试修改代码,使用新的方式来创建URL。你可以将blob数据存入数组,然后使用新的Blob对象和URL.createObjectURL方法来创建URL。具体来说,你可以这样修改代码:
```javascript
let binaryData = [];
binaryData.push(blob);
link.href = window.URL.createObjectURL(new Blob(binaryData));
```
这样修改后,应该能够解决createObjectURL方法报错的问题。希望对你有帮助!<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* *2* [TypeError: Failed to execute ‘createObjectURL‘ on ‘URL‘: Overload resolution failed](https://blog.csdn.net/qq_46302247/article/details/130011494)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item]
- *3* [Failed to execute ‘createObjectURL‘ on ‘URL‘ Overload resolution failed](https://blog.csdn.net/fwdwqdwq/article/details/123345822)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文