mirror of
https://github.com/syncthing/syncthing.git
synced 2026-12-02 14:52:42 -08:00
1 file changed
+5
-5
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user