mirror of
https://github.com/chaos-zhu/easynode.git
synced 2026-10-06 15:13:18 +08:00
fix: disable global multipart body parsing
This commit is contained in:
@@ -1,12 +1,5 @@
|
||||
const { koaBody } = require('koa-body')
|
||||
const { uploadDir } = require('../config')
|
||||
|
||||
module.exports = koaBody({
|
||||
multipart: true, // 支持 multipart-formdate 的表单
|
||||
formidable: {
|
||||
uploadDir, // 上传目录
|
||||
keepExtensions: true, // 保持文件的后缀
|
||||
multipart: true, // 多文件上传
|
||||
maxFieldsSize: 2 * 1024 * 1024 // 文件上传大小 单位:B
|
||||
}
|
||||
})
|
||||
multipart: false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user