📜  electron 将 blob 图像保存到磁盘 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:16.811000             🧑  作者: Mango

代码示例1
const fs = require('fs')

async function saveBlobToFile(blob) {
  let fileData = new Int8Array(await blob.arrayBuffer());
  fs.writeFileSync("filepath.png", fileData);
}