我的后端有base64图像字符串,现在我想使用https://github.com/nkzawa/socket.io-stream#sscreateblobreadstreamblob-options(它使用File或Blob),如何在Node.js中制作Blob?
In Node.js you don't have Blobs but Buffers. You can create a buffer from a base64 string like this:
var str = "iAAANS....SUVORK5CYII="; // <-- use real base64 string here
var buf = Buffer.from(str, "base64");
stream.write(buf);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.