diff --git a/pkg/block/s3/adapter.go b/pkg/block/s3/adapter.go index 9028cf1bcc0..8abc13596a3 100644 --- a/pkg/block/s3/adapter.go +++ b/pkg/block/s3/adapter.go @@ -308,7 +308,7 @@ func (a *Adapter) Get(ctx context.Context, obj block.ObjectPointer, _ int64) (io log.WithError(err).Errorf("failed to get S3 object bucket %s key %s", qualifiedKey.StorageNamespace, qualifiedKey.Key) return nil, err } - sizeBytes = *objectOutput.ContentLength + sizeBytes = aws.Int64Value(objectOutput.ContentLength) return objectOutput.Body, nil } @@ -400,7 +400,7 @@ func (a *Adapter) GetRange(ctx context.Context, obj block.ObjectPointer, startPo }).Error("failed to get S3 object range") return nil, err } - sizeBytes = *objectOutput.ContentLength + sizeBytes = aws.Int64Value(objectOutput.ContentLength) return objectOutput.Body, nil }