Wrapper of koa-multer, for koa-router.
Tested with Koa 2.x, should work with Koa 1.x as well.
$ npm install --save koa-router-multerImport the module
import multer from 'koa-router-multer';Set the upload folder for file uploads
var upload = multer({ dest: 'uploads/' });Example of resource
route.post('/upload', upload.single('file'), function * (next) {
var filename = this.req.file.filename;
var mimeType = this.req.file.mimetype;
...
...
});See more, koa-multer