This commit is contained in:
陆柯 2023-03-13 01:32:13 +08:00
parent 356a78efce
commit 1d1326f6b0

View File

@ -35,6 +35,7 @@ module.exports = {
file.path = file.path.replace('\\', '/')
if (wo?.ipfsStore) {
// 为了在这里使用 wo.ipfsStore.add, 需要提供 FileContent不能直接用 req.file
// 20230312: not working with nodejs above (not including) 18.2.1! https://github.com/nodejs/node/issues/46221
const { cid } = await wo.ipfsStore.add(wo.ipfsLib.globSource(file.path), {
cidVersion: 1,
hashAlg: 'sha2-256',