diff --git a/src/gcp/client.rs b/src/gcp/client.rs index 1cc72964..9a54dd7d 100644 --- a/src/gcp/client.rs +++ b/src/gcp/client.rs @@ -514,13 +514,11 @@ impl GoogleCloudStorageClient { completed_parts: Vec, ) -> Result { if completed_parts.is_empty() { - // GCS doesn't allow empty multipart uploads + // GCS doesn't allow empty multipart uploads, so fallback to regular upload. + self.multipart_cleanup(path, multipart_id).await?; let result = self - .request(Method::PUT, path) - .idempotent(true) - .do_put() + .put(path, PutPayload::new(), Default::default()) .await?; - self.multipart_cleanup(path, multipart_id).await?; return Ok(result); }