Skip to content

Releases

v2.5.0

Choose a tag to compare

@UlisesGascon UlisesGascon released this 22 Oct 11:57
2c380d0

Important: Security

What's Changed

New Contributors

Full Changelog: v2.4.0...v2.5.0

v2.4.0

Choose a tag to compare

@UlisesGascon UlisesGascon released this 14 Sep 08:11
35979e5

Highlights

multer finally supports Google Cloud Functions and Firebase 🎉

These platforms read the request body before your code runs, so multer's classic req.pipe(busboy) received nothing: empty req.body, empty req.files, and nearly a decade of duplicated issues.

The new streamHandler option closes that gap: you decide how the body reaches the parser, so the pre-read rawBody just works (see image).

const multer = require('multer')

const upload = multer({
  storage: multer.memoryStorage(),
  streamHandler: (req, busboy) => {
    // Cloud Functions / Firebase expose the pre-read body here
    if (req.rawBody) busboy.end(req.rawBody)
    else req.pipe(busboy)
  }
})

app.post('/upload', upload.single('file'), (req, res) => {
  res.json({ name: req.file.originalname, size: req.file.size })
})

This landed thanks to community PRs going back to 2017; their authors are credited as co-authors in the release.

Important: Security

What's Changed

New Contributors

Full Changelog: v2.3.0...v2.4.0

v2.3.0

Choose a tag to compare

@UlisesGascon UlisesGascon released this 28 Aug 19:10
4e8edf5

Important

What's Changed

New Contributors

Full Changelog: v2.2.0...v2.3.0

v3.0.0-alpha.2

v3.0.0-alpha.2 Pre-release
Pre-release

Choose a tag to compare

@UlisesGascon UlisesGascon released this 15 Jun 12:12
f244af6

Important

What's Changed

Full Changelog: v3.0.0-alpha.1...v3.0.0-alpha.2

v2.2.0

Choose a tag to compare

@UlisesGascon UlisesGascon released this 15 Jun 12:03
2e2af08

Important

What's Changed

New Contributors

Full Changelog: v2.1.1...v2.2.0

v2.1.1

Choose a tag to compare

@UlisesGascon UlisesGascon released this 04 Mar 16:34
368c8a1

Important

What's Changed

New Contributors

Full Changelog: v2.1.0...v2.1.1

v2.1.0

Choose a tag to compare

@UlisesGascon UlisesGascon released this 27 Feb 15:33
809f9dd

Important

What's Changed

New Contributors

Full Changelog: v2.0.2...v2.1.0

v2.0.2

Choose a tag to compare

@UlisesGascon UlisesGascon released this 17 Jul 15:30
e5db9ca

Important

Full Changelog: v2.0.1...v2.0.2

v2.0.1

Choose a tag to compare

@UlisesGascon UlisesGascon released this 03 Jun 16:26

Important

What's Changed

New Contributors

Full Changelog: v2.0.0...v2.0.1

v2.0.0

Choose a tag to compare

@ctcpip ctcpip released this 19 May 17:07

Important

What's Changed

  • 🐛 drain stream. fixes regression in node 18, remove old CI, set minimum node version, fix readme badges, add .npmrc
  • fix: handle two busboy error events
  • ♻️ fully drain stream
  • 🥅 explicitly handle req error
  • 🚨 lint:fix
  • ⬆️ bump mocha
  • docs: include release 2.0.0 details