workers-types
workers-types copied to clipboard
R2PutOptions doesn't support conditional PUT
Currently, R2PutOptions has no way of providing an If-Match condition, to allow conditional PUTs (write only if etag matches). Without this, how can we safeguard code against race conditions?
I checked that the S3 API for the same R2 bucket honours it. So your backend supports it, but not the API.
Is that deliberate? If yes, why? If not, can this be baked into the API?
Conditionals on PutObject is a non-standard extension that only landed in the S3 API ~1 week ago - it's on the backlog to make it's way into the Workers bindings.
This is supported now and represented in the current releases
Awesome, thanks!