That sounds great! So no avoiding paying the write rate for each object?
That sounds great! So no avoiding paying the write rate for each object?
Y'all are going to love it thoughI think so![]()
r2_public_beta_bindings sometime late next week (I'm not 100% sure when we'll allow such scripts - I'll keep you updated).R2Error stack is any instead of string (& in fact name/message/stack can probably be elided because of inheritance? not sure).R2Error code needs a documentation note. This code is the same code that the Cloudflare V4 API that will be documented.onlyIf needs a documentation note. The Headers it accepts require HTTP header names (IfModifiedSince/IfNotModifiedSince etc).R2Object writeHttpMetadata is missing a note. It writes out the headers from httpMetadata as you would expect (content-type, cache-control, etc)httpMetadata on put (i.e. cache-control -> cacheControl, expires -> cacheExpiry). Note that S3 uses the HTTP "Expires" name but I think that confuses people into thinking that has something to do with lifecycle. It does not. It's simply the cache expiry metadata you associate with an object.R2PutOptions has md5 and sha1 as optionals to specify the digest of the body, but those are mutually exclusive and the type needs to be reified to reflect that (the runtime enforces this, it's just not reflected in the type system).put it seems then - woot!ReadableStream must be known. For example, incoming request with a content-length and you're forwarding along the body. Or the response body of a fetch that has a content-length. Or the readable half of a FixedLengthStream transform stream.r2_public_beta_bindingsR2ErrorR2ErrorstackstackanymessageonlyIfHeadersIfModifiedSinceIfNotModifiedSinceR2ObjectwriteHttpMetadatahttpMetadatahttpMetadatacache-controlcacheControlexpirescacheExpiryR2PutOptionssha1ReadableStreamcontent-lengthcontent-lengthFixedLengthStream