u
This commit is contained in:
parent
e722b2dca2
commit
4ccfef98c9
2
index.js
2
index.js
@ -20,7 +20,7 @@ module.exports = {
|
||||
//const filename = `${req.path.replace(/^\/api\d*/, '')}_${_passtokenSource.uuid}_${Date.now()}${fileNameExtension}` // 如果最终 filename 含有 / (例如当 req.path 为 Who/todo),则必须已经存在该目录,否则在这里就出错,不会进入下面流程。
|
||||
cb(null, filename)
|
||||
},
|
||||
// req 被 multer 处理后,req.file 为 { filename, originialname, path, mimetype, size }
|
||||
// req 被 multer 处理后,req.file 为 { destination, filename, originialname, path, mimetype, size }, 其中 path 包括了 destination 和 filename 的文件完整路径。
|
||||
}),
|
||||
// fileFilter:function(req, file, cb) {},
|
||||
limits: { fileSize: 10485760 },
|
||||
|
Loading…
Reference in New Issue
Block a user