Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

expressjs/connect-multiparty

Repository files navigation

Caution

This repository is archived and no longer actively maintained.

We are no longer accepting issues, feature requests, or pull requests. For additional support or questions, please visit the Express.js Discussions page.

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

About

connect middleware for multiparty

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 3

  •  
  •  
  •