-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
For S3, I found I couldn't use CreateBucket wihout also providing a CreateBucketConfiguration with a LocationConstraint if the region wasn't the default region of us-east-1.
eg.
let action = CreateBucket::new(&self.bucket, &self.credentials);
let body = vec![
r#"<CreateBucketConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">"#,
&format!(
"<LocationConstraint>{}</LocationConstraint>",
self.bucket.region()
),
"</CreateBucketConfiguration>",
]
.join("");
self.client
.put(action.sign(ONE_HOUR))
.body(Body::from(body))
.send()?
.error_for_status()?;Recommend adding a .body() function to CreateBucket, similar to how CompleteMultipartUpload provides a .body().
Ps. Thank you for this library. Apart from this, it works perfectly, and was the first non-async S3 library I could get working.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels