-
Notifications
You must be signed in to change notification settings - Fork 6
将 Base64 格式的图片转换为 Blob #217
Copy link
Copy link
Closed
Labels
BrowserAll about browsersAll about browsers
Description
实现过程
Google:base64toblob。
参考链接:Creating a BLOB from a Base64 string in JavaScript。
核心代码:
var url = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="
fetch(url)
.then(res => res.blob())
.then(console.log)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BrowserAll about browsersAll about browsers