From 3557098f101745cd6be32527f1c628e9d6d9959d Mon Sep 17 00:00:00 2001 From: Zach Smith Date: Thu, 30 Aug 2018 16:04:40 -0700 Subject: Add AliCloud Platform support --- .../src/main/scala/xyz/driver/core/storage/AliyunBlobStorage.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core-storage') diff --git a/core-storage/src/main/scala/xyz/driver/core/storage/AliyunBlobStorage.scala b/core-storage/src/main/scala/xyz/driver/core/storage/AliyunBlobStorage.scala index fd0e7c6..e40a83e 100644 --- a/core-storage/src/main/scala/xyz/driver/core/storage/AliyunBlobStorage.scala +++ b/core-storage/src/main/scala/xyz/driver/core/storage/AliyunBlobStorage.scala @@ -99,9 +99,11 @@ object AliyunBlobStorage { this(clientId, clientSecret, endpoint, bucketId, clock) } - def apply(clientId: String, clientSecret: String, endpoint: String, bucketId: String, clock: Clock)( + def apply(clientId: String, clientSecret: String, region: String, bucketId: String, cloxk: Clock)( implicit ec: ExecutionContext): AliyunBlobStorage = { - val client = new OSSClient(endpoint, clientId, clientSecret) + // https://www.alibabacloud.com/help/doc-detail/31837.htm + val endpoint = s"https://oss-$region.aliyuncs.com" + val client = new OSSClient(endpoint, clientId, clientSecret) new AliyunBlobStorage(client, bucketId, clock) } } -- cgit v1.2.3