Repository navigation
Releases
v2.5.0
Important: Security
What's Changed
- docs: fix typo in .none() and grammar in .any() by @haimingZZ in #1485
- fix: don't add a failed upload to the abort cleanup list by @UlisesGascon in #1489
- fix: allow a field value exactly at the fieldSize limit by @MaxFreedomPollard in #1481
- chore(deps): bump github/codeql-action/init from 4.37.9 to 4.38.2 by @dependabot[bot] in #1488
- chore(deps): bump github/codeql-action/upload-sarif from 4.37.9 to 4.38.2 by @dependabot[bot] in #1487
- chore(deps): bump github/codeql-action/analyze from 4.37.9 to 4.38.2 by @dependabot[bot] in #1486
- Release: 2.5.0 by @UlisesGascon in #1490
New Contributors
- @haimingZZ made their first contribution in #1485
Full Changelog: v2.4.0...v2.5.0
v2.4.0
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
- docs: remove README translations by @UlisesGascon in #1463
- ci: add macOS to the test matrix by @kilisamemarisaaa in #1464
- feat. improve wording for LIMIT_UNEXPECTED_FILE error code by @flashbag in #426
- feat: add filename to file errors by @UjjwalKumar239 in #1416
- refactor: remove concat-stream dependency by @Phillip9587 in #1356
- fix: reject non-integer fileSize limits by @abhu85 in #1395
- fix: allow exactly limits.parts parts by @deepakganesh78 in #1446
- fix: do not consume maxCount for files skipped by fileFilter by @Sagargupta16 in #1426
- fix: validate all limits at construction time by @ShubhamOulkar in #1335
- test: cover storage engine _removeFile invocation semantics by @kilisamemarisaaa in #1460
- feat: accept a function for limits by @hossein-zare in #1133
- fix: add flush option to disk storage to fsync files before completion by @kilisamemarisaaa in #1458
- feat: expose busboy defCharset, highWaterMark and fileHwm options by @UlisesGascon in #1465
- docs: describe the file stream contract for storage engines by @UlisesGascon in #1468
- fix: wait for the flush descriptor before unlinking on aborted uploads by @UlisesGascon in #1479
- fix: reserve the maxCount slot before yielding to an async fileFilter by @UlisesGascon in #1480
- docs: add FormData upload examples by @davidmashe in #896
- feat: add streamHandler option to feed busboy from pre-consumed bodies by @UlisesGascon in #1466
- docs: add JSDoc to the public API by @UlisesGascon in #1467
- fix: decode escaped field names, not just filenames by @MohammedAlkindi in #1473
- fix: report the decoded filename on LIMIT_FILE_SIZE by @MaxFreedomPollard in #1478
- feat: allow diskStorage without options by @vaibhavmashal in #1471
- chore(deps): bump github/codeql-action/init from 4.37.4 to 4.37.9 by @dependabot[bot] in #1476
- chore(deps): bump github/codeql-action/analyze from 4.37.4 to 4.37.9 by @dependabot[bot] in #1475
- chore(deps): bump github/codeql-action/upload-sarif to 4.37.9 by @dependabot[bot] in #1474
- 2.4.0 by @UlisesGascon in #1469
New Contributors
- @flashbag made their first contribution in #426
- @UjjwalKumar239 made their first contribution in #1416
- @Phillip9587 made their first contribution in #1356
- @deepakganesh78 made their first contribution in #1446
- @Sagargupta16 made their first contribution in #1426
- @hossein-zare made their first contribution in #1133
- @davidmashe made their first contribution in #896
- @MaxFreedomPollard made their first contribution in #1478
- @vaibhavmashal made their first contribution in #1471
Full Changelog: v2.3.0...v2.4.0
v2.3.0
Important
- Fix CVE-2026-77078 (GHSA-wc9g-mqfw-jrwm)
- Fix CVE-2026-77037 (GHSA-qfvm-cv95-jqjf)
- Fix CVE-2026-77063 (GHSA-qvfw-j98x-7q72)
- Fix CVE-2026-82333 (GHSA-535w-7cp7-47q4)
What's Changed
- Update busboy link pointing to nonexistent section by @krzysdz in #1447
- Update outdated links to Express error handling guide by @krzysdz in #1405
- chore(deps): bump GitHub Actions and dev dependencies by @sheplu in #1445
- chore(ci): npm-publish via reusable workflows by @sheplu in #1364
- fix(tests): keep Git from rewriting fixture line endings on Windows by @MohammedAlkindi in #1450
- docs: correct fieldNameSize default in limits table by @UlisesGascon in #1432
- feat: normalize package.json by @UlisesGascon in #1322
- fix(test): use path.sep for cross-platform path assertions by @kilisamemarisaaa in #1452
- docs(changelog): fix typo 'comaptible' to 'compatible' by @ayushshukla1807 in #1383
- doc: adds context for link to Chinese README by @sunsheeppoplar in #1369
- docs: use crypto.randomBytes in diskStorage README example by @Hashim1999164 in #1436
- docs: clarify preservePath behavior by @vibhor-aggr in #1414
- docs: clarify parts limit behavior by @vibhor-aggr in #1430
- chore: increase test coverage by @wojtekmaj in #1355
- chore: drop deep-equal devDependency by @wojtekmaj in #1353
- docs: fix Chinese README translation by @vibhor-aggr in #1429
- Test: Enhance cross-platform test reliability and update CI workflow by @ShubhamOulkar in #1334
- fix: fallback to error code when no message mapping exists by @sahilraut191685 in #1448
- test: add coverage for preservePath by @kory-kaai in #1454
- fix: prevent process crash when fileFilter calls its callback more than once by @spokodev in #1427
- fix: preserve async hooks context in supported environments by @ajhyndman in #1124
- fix: allow files at exact fileSize limit by @raashish1601 in #1407
- fix: decode WHATWG-escaped characters in file originalname by @webdevelopersrinu in #1421
- docs: add Indonesian translation for README by @Derylfabiensyah in #1431
- test: accept files exactly at fileSize limit by @abhu85 in #1382
- docs: add Japanese translation to README by @noritaka1166 in #1354
- Update 'README-zh-cn.md' up to now by @pbstar in #1264
- feat: add an opt-in fieldArrayIndexLimit by @arpitjain099 in #1438
- docs: refresh all README translations by @UlisesGascon in #1462
- 2.3.0 by @UlisesGascon in #1455
New Contributors
- @krzysdz made their first contribution in #1447
- @sheplu made their first contribution in #1445
- @MohammedAlkindi made their first contribution in #1450
- @kilisamemarisaaa made their first contribution in #1452
- @ayushshukla1807 made their first contribution in #1383
- @sunsheeppoplar made their first contribution in #1369
- @Hashim1999164 made their first contribution in #1436
- @vibhor-aggr made their first contribution in #1414
- @sahilraut191685 made their first contribution in #1448
- @kory-kaai made their first contribution in #1454
- @spokodev made their first contribution in #1427
- @ajhyndman made their first contribution in #1124
- @raashish1601 made their first contribution in #1407
- @webdevelopersrinu made their first contribution in #1421
- @Derylfabiensyah made their first contribution in #1431
- @abhu85 made their first contribution in #1382
- @noritaka1166 made their first contribution in #1354
- @pbstar made their first contribution in #1264
- @arpitjain099 made their first contribution in #1438
Full Changelog: v2.2.0...v2.3.0
v3.0.0-alpha.2
Important
- Fix CVE-2026-5038 (GHSA-3p4h-7m6x-2hcm)
- Fix CVE-2026-5079 (GHSA-72gw-mp4g-v24j)
- Fix CVE-2025-47935 (GHSA-44fp-w29j-9vj5)
- Fix CVE-2025-47944 (GHSA-4pg4-qvpc-4q3h)
What's Changed
- replace hasOwnProperty with Object.hasOwn by @bjohansebas in #1329
- support node >=18 by @bjohansebas in #1303
- fix(v3): port CVE-2025-47944 / CVE-2025-47935 by @UlisesGascon in #1411
- Release: 3.0.0-alpha.2 by @UlisesGascon in #1413
Full Changelog: v3.0.0-alpha.1...v3.0.0-alpha.2
v2.2.0
Important
What's Changed
- chore(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1 by @dependabot[bot] in #1397
- chore(deps): bump github/codeql-action from 4.32.4 to 4.36.1 by @dependabot[bot] in #1409
- chore(deps): bump actions/checkout from 6.0.2 to 6.0.3 by @dependabot[bot] in #1410
- ci: add Node 26 to test matrix by @gameroman in #1404
- Release: 2.2.0 by @UlisesGascon in #1412
New Contributors
- @gameroman made their first contribution in #1404
Full Changelog: v2.1.1...v2.2.0
v2.1.1
Important
What's Changed
- chore: add node version to 25.x in CI by @imangas in #1372
- chore(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.3 by @dependabot[bot] in #1378
- chore(deps): bump coverallsapp/github-action from 1.2.5 to 2.3.6 by @dependabot[bot] in #1377
- chore(deps): bump github/codeql-action from 3.24.7 to 4.32.4 by @dependabot[bot] in #1376
- chore(deps): bump actions/upload-artifact from 4.5.0 to 7.0.0 by @dependabot[bot] in #1375
- chore(deps): bump actions/checkout from 4.1.1 to 6.0.2 by @dependabot[bot] in #1374
- fix error/abort handling by @ctcpip in #1373
- 2.1.1 by @UlisesGascon in #1380
New Contributors
- @imangas made their first contribution in #1372
- @dependabot[bot] made their first contribution in #1378
Full Changelog: v2.1.0...v2.1.1
v2.1.0
Important
What's Changed
- chore: add funding to package.json by @bjohansebas in #1346
- chore: drop mkdirp dependency by @wojtekmaj in #1350
- chore: drop object-assign dependency by @wojtekmaj in #1351
- chore: drop xtend dependency by @wojtekmaj in #1352
- chore(gitignore): ignore .nyc_output directory by @ShubhamOulkar in #1332
- Fix typo in README-vi.md regarding file upload by @Kunniii in #1366
- Fix typo in README-pt-br.md for array method by @matheushbm192 in #1367
- headers-support-utf8 by @Doc999tor in #1210
- Add Turkish translation (README-tr.md) by @Sabandogan in #1360
- Release: 2.1.0 by @UlisesGascon in #1371
New Contributors
- @wojtekmaj made their first contribution in #1350
- @ShubhamOulkar made their first contribution in #1332
- @Kunniii made their first contribution in #1366
- @matheushbm192 made their first contribution in #1367
- @Doc999tor made their first contribution in #1210
- @Sabandogan made their first contribution in #1360
Full Changelog: v2.0.2...v2.1.0
v2.0.2
v2.0.1
Important
What's Changed
- add Arabic translation for README .. by @3imed-jaberi in #762
- Update README.md to fix issue #1114 by @Mohamed-Abdelfattah in #1169
- Improved documentation translation to Spanish by @juliomontenegro in #1174
- Translated to french by @AlanLg in #1182
- Improve the Brazilian Portuguese translation by @vitorRibeiro7 in #1204
- doc: uzbek language by @eugene0928 in #1232
- Fix a mistake with README-pt-br.md by @Igor-CA in #1251
- Update in Readme-pt-br and fix in Readme-ko by @carlosstenzel in #1252
- chore: add support for OSSF scorecard reporting by @inigomarquinez in #1260
- ci: replace travis with github action by @inigomarquinez in #1259
- docs: improve readability by @Sreejit-Sengupto in #1255
- test: add test for out-of-band error event by @LinusU in #1294
- chore: upgrade scorecard workflow pinned action versions by @carpasse in #1290
- Documentation: remove unfortunate abbreviation from readme by @MaddyGuthridge in #1299
- ci: use
ubuntu-latestas default runner by @UlisesGascon in #1308 - ci: add CodeQL (SAST) by @bjohansebas in #1289
- Update readme badges by @bjohansebas in #1268
- 📝 fix changelog information by @ctcpip in #1316
- master -> v2 by @ctcpip in #1317
- chore: fix typo by @saucecodee in #993
- Remove --save from README by @username1001 in #929
- feat - update link badge in docs by @carlosstenzel in #1273
- ci: change branch reference by @UlisesGascon in #1319
- ♻️ use version tag for CI, fix CI badge, fix references to master/main by @ctcpip in #1324
- deps: update dependencies to latest versions by @bjohansebas in #1328
- 📝 list languages in table to prevent GH right-aligning list due to RTL language by @ctcpip in #1325
- [StepSecurity] Apply security best practices by @step-security-bot in #1311
New Contributors
- @3imed-jaberi made their first contribution in #762
- @Mohamed-Abdelfattah made their first contribution in #1169
- @juliomontenegro made their first contribution in #1174
- @AlanLg made their first contribution in #1182
- @vitorRibeiro7 made their first contribution in #1204
- @eugene0928 made their first contribution in #1232
- @Igor-CA made their first contribution in #1251
- @inigomarquinez made their first contribution in #1260
- @Sreejit-Sengupto made their first contribution in #1255
- @carpasse made their first contribution in #1290
- @MaddyGuthridge made their first contribution in #1299
- @saucecodee made their first contribution in #993
- @username1001 made their first contribution in #929
- @step-security-bot made their first contribution in #1311
Full Changelog: v2.0.0...v2.0.1
v2.0.0
Important
- Breaking change: The minimum supported Node version is now 10.16.0
- Fix CVE-2025-47935 (GHSA-44fp-w29j-9vj5)
- Fix CVE-2025-47944 (GHSA-4pg4-qvpc-4q3h)
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