my.fileSizeLimit = fileSizeLimit || globalThis.wo?.envar?.fileSizeLimit || 10485760

This commit is contained in:
luk 2024-08-03 14:09:02 +08:00
parent d33e87c3e1
commit 3c162e869f

View File

@ -10,7 +10,7 @@ module.exports = {
initMy ({ ipfsProvider, ipfsStore, fileSizeLimit }) { initMy ({ ipfsProvider, ipfsStore, fileSizeLimit }) {
my.ipfsProvider = ipfsProvider my.ipfsProvider = ipfsProvider
my.ipfsStore = ipfsStore my.ipfsStore = ipfsStore
my.fileSizeLimit = fileSizeLimit my.fileSizeLimit = fileSizeLimit || globalThis.wo?.envar?.fileSizeLimit || 10485760
return this return this
}, },
@ -35,7 +35,7 @@ module.exports = {
}, },
}), }),
// fileFilter:function(req, file, cb) {}, // fileFilter:function(req, file, cb) {},
limits: { fileSize: my.fileSizeLimit || 10485760 }, limits: { fileSize: my.fileSizeLimit },
}).single('file'), }).single('file'),
api: { api: {