From 9f2a600033a9e8f7a14a83a3685ef7991eb259dd Mon Sep 17 00:00:00 2001 From: Ramon de Klein Date: Tue, 22 Oct 2024 00:04:02 +0200 Subject: [PATCH] only retry multi-part upload as single-part upload on GCS endpoints (#2012) --- api-put-object-streaming.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-put-object-streaming.go b/api-put-object-streaming.go index eef976c8c..dac4c0efe 100644 --- a/api-put-object-streaming.go +++ b/api-put-object-streaming.go @@ -52,7 +52,7 @@ func (c *Client) putObjectMultipartStream(ctx context.Context, bucketName, objec } else { info, err = c.putObjectMultipartStreamOptionalChecksum(ctx, bucketName, objectName, reader, size, opts) } - if err != nil { + if err != nil && s3utils.IsGoogleEndpoint(*c.endpointURL) { errResp := ToErrorResponse(err) // Verify if multipart functionality is not available, if not // fall back to single PutObject operation.