diff --git a/object_store/src/aws/client.rs b/object_store/src/aws/client.rs index 4f02a981d2a..88258ac998d 100644 --- a/object_store/src/aws/client.rs +++ b/object_store/src/aws/client.rs @@ -616,10 +616,9 @@ impl S3Client { &self, location: &Path, opts: PutMultipartOpts, - checksum: bool, ) -> Result { let mut req = self.request(Method::POST, location); - if self.config.checksum == Some(Checksum::SHA256) && checksum { + if self.config.checksum == Some(Checksum::SHA256) { req = req.header("x-amz-checksum-algorithm", "SHA256"); } let response = req diff --git a/object_store/src/aws/mod.rs b/object_store/src/aws/mod.rs index 84fcef72b61..a7f9264a681 100644 --- a/object_store/src/aws/mod.rs +++ b/object_store/src/aws/mod.rs @@ -231,7 +231,7 @@ impl ObjectStore for AmazonS3 { location: &Path, opts: PutMultipartOpts, ) -> Result> { - let upload_id = self.client.create_multipart(location, opts, true).await?; + let upload_id = self.client.create_multipart(location, opts).await?; Ok(Box::new(S3MultiPartUpload { part_idx: 0, @@ -315,7 +315,7 @@ impl ObjectStore for AmazonS3 { Some(S3CopyIfNotExists::Multipart) => { let upload_id = self .client - .create_multipart(to, PutMultipartOpts::default(), false) + .create_multipart(to, PutMultipartOpts::default()) .await?; let res = async { @@ -443,7 +443,7 @@ impl MultipartUpload for S3MultiPartUpload { impl MultipartStore for AmazonS3 { async fn create_multipart(&self, path: &Path) -> Result { self.client - .create_multipart(path, PutMultipartOpts::default(), true) + .create_multipart(path, PutMultipartOpts::default()) .await }