From 6ad4bd474faeebc6e0b2a639dd41e8619366e98f Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Sat, 29 Jan 2022 17:34:39 +0800 Subject: [PATCH] rename uploadroot to filestore --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 0986474..449c795 100644 --- a/index.js +++ b/index.js @@ -10,7 +10,7 @@ module.exports = { storage: multer.diskStorage({ destination (req, file, cb) { // 如果直接提供字符串,multer会负责创建该目录。如果提供函数,你要负责确保该目录存在。 - cb(null, wo?.envi?.uploadroot) // 目录是相对于本应用的入口js的,即相对于 server.js 的位置。 + cb(null, wo?.envi?.filestore) // 目录是相对于本应用的入口js的,即相对于 server.js 的位置。 }, filename (req, file, cb) { // 注意,req.body 也许还没有信息,因为这取决于客户端发送body和file的顺序。必要的信息请从 req.headers 传递,例如 _passtoken(在multer时,尚未进入路由,不存在已装好的 _passtokenSource)