cloudflare / cloudflare/workers-sdk
🐛 BUG: `getPlatformProxy` does not accept Node `ReadableStream`s
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.5k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 186
Description
### 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
1. Clone repo below & install dependencies.
2. `node index`
### Please provide a link to a minimal reproduction
https://github.com/helloimalastair/streamprox
Contributor guide
Assessment
This issue has not been assessed yet.