Browse Source

🐛 腾讯云上传 bug

YunaiV 1 year ago
parent
commit
51968c4c19

+ 1 - 1
yudao-framework/yudao-spring-boot-starter-file/src/main/java/cn/iocoder/yudao/framework/file/core/client/s3/S3FileClient.java

@@ -81,7 +81,7 @@ public class S3FileClient extends AbstractFileClient<S3FileClientConfig> {
         }
         // 腾讯云必须有 region,否则会报错
         if (config.getEndpoint().contains(ENDPOINT_TENCENT)) {
-            return StrUtil.subAfter(config.getEndpoint(), ".cos.", false)
+            return StrUtil.subAfter(config.getEndpoint(), "cos.", false)
                     .replaceAll("." + ENDPOINT_TENCENT, ""); // 去除 Endpoint
         }
         return null;