diff options
Diffstat (limited to 'core-storage/src/main')
-rw-r--r-- | core-storage/src/main/scala/xyz/driver/core/storage/AliyunBlobStorage.scala | 6 |
1 files changed, 4 insertions, 2 deletions
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) } } |