Repository navigation
docs(file-storage): explain local write failures - #3597
Merged
kamilmysliwiec merged 2 commits intoOct 12, 2026
Merged
Conversation
Describe zero-progress and persisted-size errors, temporary-file cleanup, and preservation of existing files when a local write fails. Follow up nestjs/storage#19.
rafaself
marked this pull request as ready for review
October 11, 2026 23:53
4 tasks done
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.
PR Checklist
PR Type
What is the current behavior?
The file-storage tutorial describes atomic writes but does not explain the LocalDisk zero-progress and persisted-size checks added by nestjs/storage#19.
What is the new behavior?
Add a short paragraph beside the
put()explanation documenting temporary-file cleanup, preservation of an existing file on a failed filesystem write, and directStorageErrorfailures when writing makes no progress or the persisted size differs from the bytes written.All existing examples and other content remain unchanged.
Does this PR introduce a breaking change?
Other information
Dependency: nestjs/storage#19 is still open. Keep this PR in draft until the corresponding implementation has landed and the documentation can describe the available behavior.
This follows the documentation recommendation in nestjs/storage#19 (review).
Validation with Node 22.23.3:
npm run buildpasses, including documentation and LLM-file generation.npm test -- --watch=false: 58 tests pass.git diff --checkpasses.npm run lintreports 30 existing errors in unchanged TypeScript files.The initial
npm ciattempt reported missingchokidar@3.6.0andglob-parent@5.1.2lockfile entries. Dependencies were installed withnpm install --package-lock=false; no dependency files are changed.