This commit is contained in:
@@ -90,10 +90,7 @@ func NewS3Storage() (Storage, error) {
|
|||||||
client := s3.NewFromConfig(cfg, func(o *s3.Options) {
|
client := s3.NewFromConfig(cfg, func(o *s3.Options) {
|
||||||
o.BaseEndpoint = aws.String(endpoint)
|
o.BaseEndpoint = aws.String(endpoint)
|
||||||
o.UsePathStyle = true
|
o.UsePathStyle = true
|
||||||
o.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired
|
|
||||||
o.ResponseChecksumValidation = aws.ResponseChecksumValidationWhenRequired
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return &s3Storage{
|
return &s3Storage{
|
||||||
client: client,
|
client: client,
|
||||||
ps: s3.NewPresignClient(client),
|
ps: s3.NewPresignClient(client),
|
||||||
@@ -112,7 +109,6 @@ func (s *s3Storage) Move(ctx context.Context, src *MoveOptions, dest *MoveOption
|
|||||||
Bucket: aws.String(dest.Bucket),
|
Bucket: aws.String(dest.Bucket),
|
||||||
Key: aws.String(dest.Key),
|
Key: aws.String(dest.Key),
|
||||||
CopySource: aws.String(copySource),
|
CopySource: aws.String(copySource),
|
||||||
MetadataDirective: types.MetadataDirectiveCopy,
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to copy object: %w", err)
|
return fmt.Errorf("failed to copy object: %w", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user