diff --git a/backend/scoutfs/scoutfs.go b/backend/scoutfs/scoutfs.go index 60c2e84..02c270d 100644 --- a/backend/scoutfs/scoutfs.go +++ b/backend/scoutfs/scoutfs.go @@ -287,7 +287,7 @@ func (s *ScoutFS) CompleteMultipartUpload(ctx context.Context, input *s3.Complet if err != nil { etag = "" } - if parts[i].ETag == nil || etag != *parts[i].ETag { + if parts[i].ETag == nil || !areEtagsSame(etag, *parts[i].ETag) { return res, "", s3err.GetAPIError(s3err.ErrInvalidPart) } @@ -1025,3 +1025,7 @@ func isNoAttr(err error) bool { } return false } + +func areEtagsSame(e1, e2 string) bool { + return strings.Trim(e1, `"`) == strings.Trim(e2, `"`) +}