1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-23 11:43:17 +00:00

Add minios:// for minio servers with SSL support

This commit is contained in:
Gilbert Chen
2017-07-12 21:09:19 -04:00
parent f8d879d414
commit 483ae5e6eb
3 changed files with 10 additions and 8 deletions

View File

@@ -293,7 +293,7 @@ func CreateStorage(preference Preference, resetPassword bool, threads int) (stor
SavePassword(preference, "ssh_password", password)
}
return sftpStorage
} else if matched[1] == "s3" || matched[1] == "s3c" || matched[1] == "minio"{
} else if matched[1] == "s3" || matched[1] == "s3c" || matched[1] == "minio" || matched[1] == "minios" {
// urlRegex := regexp.MustCompile(`^(\w+)://([\w\-]+@)?([^/]+)(/(.+))?`)
@@ -328,8 +328,9 @@ func CreateStorage(preference Preference, resetPassword bool, threads int) (stor
return nil
}
} else {
isMinioCompatible := matched[1] == "minio"
storage, err = CreateS3Storage(region, endpoint, bucket, storageDir, accessKey, secretKey, threads, isMinioCompatible)
isMinioCompatible := (matched[1] == "minio" || matched[1] == "minios")
isSSLSupported := (matched[1] == "s3" || matched[1] == "minios")
storage, err = CreateS3Storage(region, endpoint, bucket, storageDir, accessKey, secretKey, threads, isSSLSupported, isMinioCompatible)
if err != nil {
LOG_ERROR("STORAGE_CREATE", "Failed to load the S3 storage at %s: %v", storageURL, err)
return nil