From 5f441eedff2b7621c46aded8b1caf3b665b8e8a9 Mon Sep 17 00:00:00 2001 From: Artjoms Iskovs Date: Thu, 15 Sep 2022 17:22:53 +0100 Subject: [PATCH] Fix multipart uploads on Minio (#2731) The official Minio SDK uses "uploads=" as the URL when it initiates a multipart upload instead of "uploads". This affects the AWSV4 signature and causes object_store to fail a signature check when initiating the upload to Minio. It's possible that this contradicts the AWS S3 API docs: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html#API_CreateMultipartUpload_RequestSyntax and we need to instead keep the URL as `?uploads` and change the URL that goes into the signature instead. --- object_store/src/aws/client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/object_store/src/aws/client.rs b/object_store/src/aws/client.rs index d8ab3bba8f2..f800fec3dc5 100644 --- a/object_store/src/aws/client.rs +++ b/object_store/src/aws/client.rs @@ -411,7 +411,7 @@ impl S3Client { pub async fn create_multipart(&self, location: &Path) -> Result { let credential = self.get_credential().await?; let url = format!( - "{}/{}/{}?uploads", + "{}/{}/{}?uploads=", self.config.endpoint, self.config.bucket, encode_path(location)