This package has been deprecated

Author message:

Please use @koa/multer instead, see <https://github.com/koajs/multer>

koa-multer
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/koa-multer package

1.0.2 • Public • Published

koa-multer

Multer is a node.js middleware for handling multipart/form-data for koa.
multer wrapper for koa's middleware.

NPM version NPM Downloads Build status Test coverage Dependency status License

Install

$ npm install --save koa-multer

Usage

=1.x, 100%, working with multer-v1.x and koa-v2.x.

const Koa = require('koa');
const route = require('koa-route');
const multer = require('koa-multer');
 
const app = new Koa();
const upload = multer({ dest: 'uploads/' });
 
app.use(route.post('/profile', upload.single('avatar')));
 
app.listen(3000);

=0.x, working with multer-v0.x(v0.1.8 is the latset version of v0.x) and koa-v1.x

var koa = require('koa');
var multer = require('koa-multer');
 
var app = koa();
 
app.use(multer({ dest: './uploads/'}));
 
app.listen(3000);

License

MIT

Package Sidebar

Install

npm i koa-multer

Weekly Downloads

21,097

Version

1.0.2

License

MIT

Last publish

Collaborators

  • fundon