Эх сурвалжийг харах

阿里云OSS解析region时兼容带https的配置

huangyemin 2 жил өмнө
parent
commit
93135363c6

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

@@ -75,7 +75,8 @@ public class S3FileClient extends AbstractFileClient<S3FileClientConfig> {
         // 阿里云必须有 region,否则会报错
         if (config.getEndpoint().contains(ENDPOINT_ALIYUN)) {
             return StrUtil.subBefore(config.getEndpoint(), '.', false)
-                    .replaceAll("-internal", ""); // 去除内网 Endpoint 的后缀
+                    .replaceAll("-internal", "")// 去除内网 Endpoint 的后缀
+                    .replaceAll("https://", "");
         }
         return null;
     }