Skip to content

Conversation

lukevalenta
Copy link
Contributor

@lukevalenta lukevalenta commented Jul 16, 2025

Add support for deleting multiple R2 keys at once with delete_multiple. After this change, the Rust bindings should have parity with the Javascript API for R2 bucket operations, at least: https://developers.cloudflare.com/r2/api/workers/workers-api-reference/#bucket-method-definitions.

The implementation is similar to how delete_multiple is implemented for DO storage: https://github.com/cloudflare/workers-rs/blob/main/worker-sys/src/types/durable_object/storage.rs#L36.

Local testing with worker-sandbox appears to work fine:

cd worker-sandbox
npx wrangler dev

curl -X DELETE http://localhost:8787/r2/delete
ok

@guybedford guybedford merged commit dd0e636 into cloudflare:main Jul 16, 2025
3 checks passed
@guybedford
Copy link
Collaborator

Thanks, will aim to do the next release in the coming days.

@lukevalenta lukevalenta deleted the r2-delete-multiple branch July 16, 2025 23:25
@lukevalenta
Copy link
Contributor Author

Hey @guybedford, still planning to cut a new release soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants