Socket
Socket
Sign inDemoInstall

connect-multiparty

Package Overview
Dependencies
17
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    connect-multiparty

multipart parsing middleware for connect using multiparty


Version published
Weekly downloads
62K
decreased by-10.33%
Maintainers
2
Install size
587 kB
Created
Weekly downloads
 

Readme

Source

connect-multiparty

NPM Version NPM Downloads Build Status Test Coverage

connect middleware for multiparty.

I actually recommend against using this module. It's cleaner to use the multiparty API directly.

This middleware will create temp files on your server and never clean them up. Thus you should not add this middleware to all routes; only to the ones in which you want to accept uploads. And in these endpoints, be sure to delete all temp files, even the ones that you don't use.

Usage

var multipart = require('connect-multiparty');
var multipartMiddleware = multipart();
app.post('/upload', multipartMiddleware, function(req, resp) {
  console.log(req.body, req.files);
  // don't forget to delete all req.files when done
});

If you pass options to multipart(), they are passed directly into multiparty.

License

MIT

FAQs

Last updated on 15 Sep 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc