From c59f5849302f98947e34be8d38b285960eae43ea Mon Sep 17 00:00:00 2001 From: allnightlong Date: Sun, 7 Dec 2014 21:57:59 +0300 Subject: [PATCH] support s3 compatible storages --- .../plugins/karman/aws/S3StorageProvider.groovy | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/groovy/com/bertramlabs/plugins/karman/aws/S3StorageProvider.groovy b/src/main/groovy/com/bertramlabs/plugins/karman/aws/S3StorageProvider.groovy index 7cb24fd..0c7ca2a 100644 --- a/src/main/groovy/com/bertramlabs/plugins/karman/aws/S3StorageProvider.groovy +++ b/src/main/groovy/com/bertramlabs/plugins/karman/aws/S3StorageProvider.groovy @@ -31,6 +31,7 @@ class S3StorageProvider extends StorageProvider { String accessKey = '' String secretKey = '' String region = '' + String endpoint = '' Directory getDirectory(String name) { new S3Directory(name: name, provider: this) @@ -50,6 +51,10 @@ class S3StorageProvider extends StorageProvider { Region region = RegionUtils.getRegion(region) client.region = region } + if (endpoint) { + client.endpoint = endpoint + client.s3ClientOptions = new S3ClientOptions().withPathStyleAccess(true) + } } else { return null } @@ -65,4 +70,4 @@ class S3StorageProvider extends StorageProvider { ) } -} \ No newline at end of file +}