From f0c066f9cad198b10d82004d4dcf6506306fc7a8 Mon Sep 17 00:00:00 2001 From: Ramon de Klein Date: Mon, 21 Oct 2024 23:44:45 +0200 Subject: [PATCH] only retry multi-part upload as single-part upload on GCS endpoints --- 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.