mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
S3: expose more properties, possible backward incompatible change
Before these changes we implictly set S3ForcePathStyle if an endpoint was provided. This can cause issues with some S3 compatible object storages and must be explicitly set now. AWS is also deprecating this setting https://aws.amazon.com/it/blogs/aws/amazon-s3-path-deprecation-plan-the-rest-of-the-story/
This commit is contained in:
@@ -1057,12 +1057,21 @@ func compareS3Config(expected *vfs.Filesystem, actual *vfs.Filesystem) error {
|
||||
if expected.S3Config.UploadPartSize != actual.S3Config.UploadPartSize {
|
||||
return errors.New("fs S3 upload part size mismatch")
|
||||
}
|
||||
if expected.S3Config.DownloadPartMaxTime != actual.S3Config.DownloadPartMaxTime {
|
||||
return errors.New("fs S3 download part max time mismatch")
|
||||
}
|
||||
if expected.S3Config.UploadConcurrency != actual.S3Config.UploadConcurrency {
|
||||
return errors.New("fs S3 upload concurrency mismatch")
|
||||
}
|
||||
if expected.S3Config.DownloadPartSize != actual.S3Config.DownloadPartSize {
|
||||
return errors.New("fs S3 download part size mismatch")
|
||||
}
|
||||
if expected.S3Config.DownloadConcurrency != actual.S3Config.DownloadConcurrency {
|
||||
return errors.New("fs S3 download concurrency mismatch")
|
||||
}
|
||||
if expected.S3Config.ForcePathStyle != actual.S3Config.ForcePathStyle {
|
||||
return errors.New("fs S3 force path style mismatch")
|
||||
}
|
||||
if expected.S3Config.DownloadPartMaxTime != actual.S3Config.DownloadPartMaxTime {
|
||||
return errors.New("fs S3 download part max time mismatch")
|
||||
}
|
||||
if expected.S3Config.KeyPrefix != actual.S3Config.KeyPrefix &&
|
||||
expected.S3Config.KeyPrefix+"/" != actual.S3Config.KeyPrefix {
|
||||
return errors.New("fs S3 key prefix mismatch")
|
||||
|
||||
Reference in New Issue
Block a user