[pbs-devel] [PATCH proxmox v6 6/9] s3 client: implement methods to operate on s3 objects in bucket
Christian Ebner
c.ebner at proxmox.com
Wed Jul 9 12:04:45 CEST 2025
On 7/8/25 19:00, Christian Ebner wrote:
> + /// Delete multiple objects from a bucket using a single HTTP request.
> + /// See reference docs: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html
> + pub async fn delete_objects(
> + &self,
> + object_keys: &[S3ObjectKey],
> + ) -> Result<DeleteObjectsResponse, Error> {
> + let mut body = String::from(r#"<Delete xmlns="http://s3.amazonaws.com/doc/2006-03-01/">"#);
> + for object_key in object_keys {
> + body.push_str("<Object><Key>");
> + body.push_str(object_key);
Another regression since version 5:
As S3ObjectKey now always uri encodes the key, in the request body
however the plain key must be used, the object key must be uri decoded
here before adding it to the body.
Noticed since snapshots now were not deleted from the S3 store anymore,
because of the uri encoded colons in the snapshot directory in the
request body.
More information about the pbs-devel
mailing list