#How to set known length for R2 put?

13 messages · Page 1 of 1 (latest)

iron karma
#

The ReadableStream doesn't have a field for read/write length.

iron karma
#

I already put in the content-length headers 🤔

iron karma
#

If I pass the ReadableStream from request.body it will upload successfully

#

If I new ReadableStream manually, it'll throw the error.

grim ocean
#

you should use a FixedLengthStream if your creating your own

iron karma
grim ocean
#

Not without buffering it

#

If it's from a request, just use request.body

iron karma
#

How about, first fetch with the instruction body and the second fetch with data?

gaunt copper
iron karma
gaunt copper