Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-router-multer

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-router-multer

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

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17
decreased by-32%
Maintainers
1
Weekly downloads
 
Created
Source

koa-router-multer

Wrapper of koa-multer, for koa-router.

Tested with Koa 2.x, should work with Koa 1.x as well.

Dependency Status devDependency Status license

Install

$ npm install --save koa-router-multer

Usage

Import 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

License

MIT

Keywords

FAQs

Package last updated on 05 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc