@koa-framework/koa-multer

0.3.0 • Public • Published

@luobotang/koa-multer

安装

npm i @luobotang/koa-multer

配置

module.exports = {
  multer: {
    // options pass to 'multer'
  }
}

使用

路由:

router.post('/form', interceptor.multer.single('file'), controller.foo.form)

Controller:

exports.form = async (ctx) => {
  const { originalname, size, mimetype } = ctx.file
  ctx.body = `${originalname} ${size} ${mimetype}`
}

Readme

Keywords

none

Package Sidebar

Install

npm i @koa-framework/koa-multer

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

911 B

Total Files

3

Last publish

Collaborators

  • jrfuture
  • koa-framework-admin