koa-multer

Middleware for handling `multipart/form-data` for koa.

Please use @koa/multer instead, see <https://github.com/koajs/multer>
Last updated 3 years ago by fundon .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install koa-multer 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.2                                ...           latest (3 years ago)

6 Versions

  • 1.0.2 [deprecated]           ...           3 years ago
  • 1.0.1 [deprecated]           ...           4 years ago
  • 1.0.0 [deprecated]           ...           5 years ago
  • 1.0.0-alpha.1                                ...           5 years ago
  • 0.0.2 [deprecated]           ...           5 years ago
  • 0.0.1 [deprecated]           ...           5 years ago
Maintainers (1)
Downloads
Today 1
This Week 1,195
This Month 1
Last Day 297
Last Week 2,795
Last Month 10,644
Dependencies (1)
Dev Dependencies (10)
Dependents (123)

Copyright 2014 - 2016 © taobao.org |