docs: clarify preservePath behavior - #1414
Merged
UlisesGascon merged 2 commits intoAug 24, 2026
Merged
Conversation
UlisesGascon
approved these changes
Aug 24, 2026
UlisesGascon
left a comment
Member
There was a problem hiding this comment.
Thanks @vibhor-aggr! I just added a minor suggestion 👍
This was referenced Aug 24, 2026
Merged
YasharF
added a commit
to sahat/hackathon-starter
that referenced
this pull request
Aug 28, 2026
config/morgan.js: colors moved out of the token and into the format string, where morgan doesn't touch them Dependency Release Notes: Multer v2.3.0 - Fix [CVE-2026-77078](https://www.cve.org/CVERecord?id=CVE-2026-77078) ([GHSA-wc9g-mqfw-jrwm](GHSA-wc9g-mqfw-jrwm)) - Fix [CVE-2026-77037](https://www.cve.org/CVERecord?id=CVE-2026-77037) ([GHSA-qfvm-cv95-jqjf](GHSA-qfvm-cv95-jqjf)) - Fix [CVE-2026-77063](https://www.cve.org/CVERecord?id=CVE-2026-77063) ([GHSA-qvfw-j98x-7q72](GHSA-qvfw-j98x-7q72)) - Fix [CVE-2026-82333](https://www.cve.org/CVERecord?id=CVE-2026-82333) ([GHSA-535w-7cp7-47q4](GHSA-535w-7cp7-47q4)) - Add `MulterError` codes `INVALID_FIELD_NAME` and `STREAM_DESTROYED` - Add opt-in `limits.fieldArrayIndexLimit` to bound numeric array indexes in field names ([#1438](expressjs/multer#1438)) - Accept files whose size is exactly `limits.fileSize` ([#1407](expressjs/multer#1407)) - Preserve the caller's async context (`AsyncLocalStorage`) when calling `next()` ([#1124](expressjs/multer#1124)) - Decode WHATWG-escaped characters (`%0A`, `%0D`, `%22`) in `file.originalname` ([#1421](expressjs/multer#1421)) - Do not crash when `fileFilter` invokes its callback more than once ([#1427](expressjs/multer#1427)) - Use a fallback message for `MulterError` codes without a mapping ([#1448](expressjs/multer#1448)) - Docs: clarify `preservePath` and `parts`, use `crypto.randomBytes` in the `DiskStorage` example ([#1414](expressjs/multer#1414), [#1430](expressjs/multer#1430), [#1436](expressjs/multer#1436)) - Docs: add Indonesian, Japanese and Tamil translations and refresh all translations from the current README ([#1431](expressjs/multer#1431), [#1354](expressjs/multer#1354), [#1462](expressjs/multer#1462)) - Internal: run the test suite on Windows ([#1334](expressjs/multer#1334)) Morgan 1.12.0 - Security fix for [CVE-2026-15603](https://www.cve.org/CVERecord?id=CVE-2026-15603)([GHSA-jxfw-x594-9x9m](https://github.com/expressjs/morgan/security/advisories/GHSA-jxfw-x594-9x9m)) - Allow format functions to return objects for streams in `objectMode` - Respect the `NO_COLOR` environment variable in the `dev` format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clarifies what
preservePath: truedoes for uploaded file metadata.The README currently says it keeps the full path instead of the base name, but it does not explain where that path appears or that it is client-supplied input. This adds wording that:
file.originalnameas the field affected bypreservePath;file.originalnamebefore using it in a custom filename or storage engine.Refs #846.
Verification:
npm test(72 passing)npm run lintwith HOME pointed at the task workspace because the sandbox home is read-onlygit diff --check HEAD~1..HEAD