corie-body-parser
Note: wrap formidable as a middleware for koa2.
如果该插件对您的开发有所帮助,请五星好评哦!^^ ^^ ^_^
Table of contents
Installation
npm install --save corie-body-parser # or cnpm install --save corie-body-parser
Usage
const Koa = ;const middleware = ; const app = ;app;
Options explanation:
encoding
设置表单字段的编码uploadDir
设置上传后的文件存放的目录, 默认为:os.tmpdir()
keepExtensions
设置上传后的文件是否保持原来的扩展名type
multipart
orurlencoded
maxFieldsSize
设置提交到后台数据的大小, 默认为: 20MBmaxFileSize
设置上传文件的大小, 默认为: 200MBmaxFields
设置url后面可接收的参数, 默认为: 1000hash
使用sha1
ormd5
校验文件