Skip to content

docs: correct fieldNameSize default in limits table - #1432

Merged
UlisesGascon merged 1 commit into
mainfrom
docs/limits-defaults-h696
Aug 24, 2026
Merged

UlisesGascon merged 1 commit into
mainfrom
docs/limits-defaults-h696

Conversation

@UlisesGascon

Copy link
Copy Markdown
Member

README.md:277 documents fieldNameSize as defaulting to 100 bytes, but the runtime does not enforce that default. lib/make-middleware.js only checks fieldNameSize when the developer explicitly passes it via limits, gated behind Object.prototype.hasOwnProperty.call(limits, 'fieldNameSize').

Correcting the table to say Infinity matches the shape of adjacent unenforced-limit rows (fields, parts, fieldNestingDepth) and reflects actual multer runtime behavior. Developers who want a bound must set limits.fieldNameSize explicitly.

A separate PR against v3 will add a real enforced default as a breaking change for the next major release.

The runtime does not enforce a 100-byte default; the check in
lib/make-middleware.js is gated behind
Object.prototype.hasOwnProperty.call(limits, 'fieldNameSize').
Aligning docs with actual behavior.
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 99.01%. remained the same — docs/limits-defaults-h696 into main

@UlisesGascon
UlisesGascon merged commit 8ab6ac8 into main Aug 24, 2026
40 checks passed
@UlisesGascon
UlisesGascon deleted the docs/limits-defaults-h696 branch August 24, 2026 14:55
@UlisesGascon UlisesGascon mentioned this pull request Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants