diff --git a/internal/blob/s3/s3.go b/internal/blob/s3/s3.go index 323052e23..868ac72ca 100644 --- a/internal/blob/s3/s3.go +++ b/internal/blob/s3/s3.go @@ -14,6 +14,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/credentials" "github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager" + transfertypes "github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager/types" "github.com/aws/aws-sdk-go-v2/service/s3" "github.com/aws/aws-sdk-go-v2/service/s3/types" "github.com/syncthing/syncthing/internal/blob" @@ -39,11 +40,10 @@ func NewSession(endpoint, region, bucket, accessKeyID, secretKey string) (*Sessi opts.BaseEndpoint = aws.String(endpoint) } client := s3.New(opts) - transfer := transfermanager.New(client) - // , func(opts *transfermanager.Options) { - // opts.GetObjectType = transfertypes.GetObjectRanges - // opts.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired - // } + transfer := transfermanager.New(client, func(opts *transfermanager.Options) { + opts.GetObjectType = transfertypes.GetObjectRanges + // opts.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired + }) return &Session{ bucket: bucket, client: client,