Signed-off-by: Jakob Borg <[email protected]>
This commit is contained in:
Jakob Borg committed 2026-11-29 11:39:39 +01:00
1 parent 24d86fe257
commit fd0ceb3cf7
1 file changed
+5 -5
+5 -5
View File
@@ -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,