Closed Dream4ever closed 2 years ago
Google:base64toblob。
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)
实现过程
Google:
base64toblob
。参考链接:Creating a BLOB from a Base64 string in JavaScript。
核心代码: