workers-sdk
workers-sdk copied to clipboard
🐛 BUG: `getPlatformProxy` does not accept Node `ReadableStream`s
Which Cloudflare product(s) does this pertain to?
R2, Wrangler
What version(s) of the tool(s) are you using?
3.71.0
What version of Node are you using?
22.6.0
What operating system and version are you using?
MacOS Sonoma 14.6.1
Describe the Bug
Observed behavior
When calling R2.put in an R2Bucket binding from getPlatformProxy(), you get the error
Provided readable stream must have a known length (request/response body or readable half of FixedLengthStream)
Even if the ReadableStream used was derived from a Request.
Expected behavior
R2.put should accept a ReadableStream with a known length.
Steps to reproduce
- Clone repo below & install dependencies.
node index
Please provide a link to a minimal reproduction
https://github.com/helloimalastair/streamprox
Good feedback cc @jonesphillip @dario-piotrowicz @jasnell