-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Content-Length and FixedLengthStream to R2 get response (#712)
* Add Content-Length and FixedLengthStream to R2 get response Before this, we would see that the following code wouldn't work: ``` const res = await env.BUCKET.get(name); await env.BUCKET.put(name, res!.body); ``` As it would throw: TypeError: Provided readable stream must have a known length (request/response body or readable half of FixedLengthStream) * Test fixed length R2 get responses --------- Co-authored-by: bcoll <[email protected]>
- Loading branch information
Showing
3 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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