mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-02 11:44:45 -06:00
Make the S3 backend compatible with minio
This commit is contained in:
@@ -23,7 +23,7 @@ type S3Storage struct {
|
||||
|
||||
// CreateS3Storage creates a amazon s3 storage object.
|
||||
func CreateS3Storage(regionName string, endpoint string, bucketName string, storageDir string,
|
||||
accessKey string, secretKey string, threads int) (storage *S3Storage, err error) {
|
||||
accessKey string, secretKey string, threads int, isMinioCompatible bool) (storage *S3Storage, err error) {
|
||||
|
||||
token := ""
|
||||
|
||||
@@ -53,7 +53,9 @@ func CreateS3Storage(regionName string, endpoint string, bucketName string, stor
|
||||
Region: aws.String(regionName),
|
||||
Credentials: auth,
|
||||
Endpoint: aws.String(endpoint),
|
||||
}
|
||||
S3ForcePathStyle: aws.Bool(isMinioCompatible),
|
||||
DisableSSL: aws.Bool(isMinioCompatible),
|
||||
}
|
||||
|
||||
if len(storageDir) > 0 && storageDir[len(storageDir) - 1] != '/' {
|
||||
storageDir += "/"
|
||||
|
||||
Reference in New Issue
Block a user