Skip to content

Commit 9f2a600

Browse files
authored
only retry multi-part upload as single-part upload on GCS endpoints (#2012)
1 parent 499781c commit 9f2a600

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api-put-object-streaming.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (c *Client) putObjectMultipartStream(ctx context.Context, bucketName, objec
5252
} else {
5353
info, err = c.putObjectMultipartStreamOptionalChecksum(ctx, bucketName, objectName, reader, size, opts)
5454
}
55-
if err != nil {
55+
if err != nil && s3utils.IsGoogleEndpoint(*c.endpointURL) {
5656
errResp := ToErrorResponse(err)
5757
// Verify if multipart functionality is not available, if not
5858
// fall back to single PutObject operation.

0 commit comments

Comments
 (0)