Commit 728d7cdf authored by pete谢兆麟's avatar pete谢兆麟

添加本地桶匹配逻辑

parent ea4c897f
...@@ -168,8 +168,14 @@ class YHOSSManager: NSObject, URLSessionDelegate { ...@@ -168,8 +168,14 @@ class YHOSSManager: NSObject, URLSessionDelegate {
} }
func getBucket(_ url: String) -> String { func getBucket(_ url: String) -> String {
if url.contains(self.model.bucket) { if url.contains("test-bucket-v1-pub.oss-cn-shenzhen.aliyuncs.com") {
return self.model.bucket return "test-bucket-v1-pub"
}else if url.contains("prod-bucket-v1.oss-cn-shenzhen.aliyuncs.com") {
return "prod-bucket-v1"
}else if url.contains("prod-bucket-v1-pub.oss-cn-shenzhen.aliyuncs.com") {
return "prod-bucket-v1-pub"
} else if url.contains("test-bucket-v1.oss-cn-shenzhen.aliyuncs.com") {
return "test-bucket-v1"
} else if url.contains("test-cdn.galaxy-immi.com") { } else if url.contains("test-cdn.galaxy-immi.com") {
return "test-bucket-v1" return "test-bucket-v1"
} else if url.contains("test-cdn-pub.galaxy-immi.com") { } else if url.contains("test-cdn-pub.galaxy-immi.com") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment