fix(#433): stream multipart uploads without buffering files#505
Open
ManuelReschke wants to merge 1 commit into
Open
fix(#433): stream multipart uploads without buffering files#505ManuelReschke wants to merge 1 commit into
ManuelReschke wants to merge 1 commit into
Conversation
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.
This change makes multipart uploads stream directly to the HTTP transport instead of building the complete multipart body in a
bytes.Bufferfirst.io.Pipe, keeping memory usage bounded for large uploads.Content-LengthforSetFileandSetFileBytesby counting multipart framing bytes and adding the known file sizes without reading the file contents into memory.SetFilefor each attempt and inspect only the first 512 bytes when detecting their content type.SetFileReaderbodies as non-replayable, preventing retries from silently sending an exhausted reader.Content-Length behavior
SetFileand non-emptySetFileBytesuploads retain an exactContent-Length.FileSizeandContentTypeset also retain an exactContent-Length.Validation performed: