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

multer

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multer - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change log

## 1.0.5 - 2015-09-19
- Bugfix: drain the stream before considering request done
## 1.0.4 - 2015-09-19
- Bugfix: propagate all errors from busboy
## 1.0.3 - 2015-08-06

@@ -8,0 +16,0 @@

10

lib/make-middleware.js
var is = require('type-is')
var Busboy = require('busboy')
var extend = require('xtend')
var onFinished = require('on-finished')
var appendField = require('append-field')

@@ -11,2 +12,6 @@

function drainStream (stream) {
stream.on('readable', stream.read.bind(stream))
}
function makeMiddleware (setup) {

@@ -42,5 +47,8 @@ return function multerMiddleware (req, res, next) {

isDone = true
req.unpipe(busboy)
drainStream(req)
busboy.removeAllListeners()
next(err)
onFinished(req, function () { next(err) })
}

@@ -47,0 +55,0 @@

3

package.json
{
"name": "multer",
"description": "Middleware for handling `multipart/form-data`.",
"version": "1.0.4",
"version": "1.0.5",
"contributors": [

@@ -27,2 +27,3 @@ "Hage Yaapa <captain@hacksparrow.com> (http://www.hacksparrow.com)",

"object-assign": "^3.0.0",
"on-finished": "^2.3.0",
"type-is": "^1.6.4",

@@ -29,0 +30,0 @@ "xtend": "^4.0.0"

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