Skip to content

fix: allow files at exact fileSize limit#1407

Open
raashish1601 wants to merge 1 commit into
expressjs:mainfrom
raashish1601:fix/file-size-boundary
Open

fix: allow files at exact fileSize limit#1407
raashish1601 wants to merge 1 commit into
expressjs:mainfrom
raashish1601:fix/file-size-boundary

Conversation

@raashish1601

Copy link
Copy Markdown

What changed

  • Increase configured ileSize limit passed to Busboy by 1 byte only when limits.fileSize is explicitly set.
  • This avoids treating an upload exactly equal to limits.fileSize as over-size while preserving the current error for larger uploads.
  • Add regression test for exact-boundary acceptance in est/error-handling.js.

Fixes #1348 (off-by-one file size limit behavior).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

multer throws "File too large" error if file size of exact "limits.fileSize" bytes provided.

1 participant