wrangler r2 object put: Add --if-none-match flag for conditional uploads #13169
alexminza
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the solution
Summary
wrangler r2 object putshould support conditional uploads via--if-none-match(and other S3-compatible conditional headers), allowing "put-if-not-exists" semantics without a separate check.Current behavior
wrangler r2 object putalways overwrites the target object unconditionally. To avoid overwriting, you must first runwrangler r2 object getto check existence, then conditionallyput— introducing a race window and requiring error suppression on theget.Exit code should reflect the outcome:
Beta Was this translation helpful? Give feedback.
All reactions