rename filestore to File_Store

This commit is contained in:
陆柯 2022-04-03 12:48:45 +08:00
parent 6ad4bd474f
commit 0a4cf537d1

View File

@ -10,7 +10,7 @@ module.exports = {
storage: multer.diskStorage({
destination (req, file, cb) {
// 如果直接提供字符串multer会负责创建该目录。如果提供函数你要负责确保该目录存在。
cb(null, wo?.envi?.filestore) // 目录是相对于本应用的入口js的即相对于 server.js 的位置。
cb(null, wo?.envi?.File_Store) // 目录是相对于本应用的入口js的即相对于 server.js 的位置。
},
filename (req, file, cb) {
// 注意req.body 也许还没有信息因为这取决于客户端发送body和file的顺序。必要的信息请从 req.headers 传递,例如 _passtoken在multer时尚未进入路由不存在已装好的 _passtokenSource