【发布时间】:2021-09-30 20:36:56
【问题描述】:
有谁知道如何在 ElectronJS 中将 Blob 转换为 File 对象。我试过了:
return new File([blob], fileName, {lastModified: new Date().getTime(), type: blob.type});
但似乎 ElectronJs 有不同的 File 对象 API:
ElectronJs 文件功能:
Chrome浏览器文件功能
我也试过了:
(blob as any).name = fileName;
(blob as any).lastModified = new Date().getTime();
return blob as File;
但也不起作用。
【问题讨论】:
标签: javascript typescript file electron