From 93135363c6e2ef408c6ddced1d7efaf352ef9c20 Mon Sep 17 00:00:00 2001 From: huangyemin Date: Wed, 12 Oct 2022 11:26:38 +0800 Subject: [PATCH] 阿里云OSS解析region时兼容带https的配置 --- yudao-framework/yudao-spring-boot-starter-file/src/main/java/cn/iocoder/yudao/framework/file/core/client/s3/S3FileClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yudao-framework/yudao-spring-boot-starter-file/src/main/java/cn/iocoder/yudao/framework/file/core/client/s3/S3FileClient.java b/yudao-framework/yudao-spring-boot-starter-file/src/main/java/cn/iocoder/yudao/framework/file/core/client/s3/S3FileClient.java index 8de178b..ab95d4b 100644 --- a/yudao-framework/yudao-spring-boot-starter-file/src/main/java/cn/iocoder/yudao/framework/file/core/client/s3/S3FileClient.java +++ b/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 { // 阿里云必须有 region,否则会报错 if (config.getEndpoint().contains(ENDPOINT_ALIYUN)) { return StrUtil.subBefore(config.getEndpoint(), '.', false) - .replaceAll("-internal", ""); // 去除内网 Endpoint 的后缀 + .replaceAll("-internal", "")// 去除内网 Endpoint 的后缀 + .replaceAll("https://", ""); } return null; } -- libgit2 0.21.4