From da674879a37d6c4c5a7209c92ce4893f9f946fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=9D=E6=9C=88?= Date: Thu, 3 Apr 2025 09:29:40 +0000 Subject: [PATCH] =?UTF-8?q?fix(system/storage):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84=E4=B8=AD=E5=AD=98=E5=9C=A8?= =?UTF-8?q?bucketName=E8=BF=94=E5=9B=9E=E9=94=99=E8=AF=AFrelativePath?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/top/continew/admin/system/model/entity/FileDO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continew-module-system/src/main/java/top/continew/admin/system/model/entity/FileDO.java b/continew-module-system/src/main/java/top/continew/admin/system/model/entity/FileDO.java index 559fe30d..acd2f19c 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/model/entity/FileDO.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/model/entity/FileDO.java @@ -172,7 +172,7 @@ public class FileDO extends BaseDO { String relativePath = fullPath.startsWith(StringConstants.SLASH) ? fullPath.substring(1) : fullPath; // 如果路径以 bucketName 开头,则移除 bucketName 例如: bucketName/2024/11/27/ -> 2024/11/27/ if (relativePath.startsWith(storageDO.getBucketName())) { - return StrUtil.split(relativePath, storageDO.getBucketName()).get(1); + return StrUtil.subAfter(relativePath, storageDO.getBucketName(), false); } return relativePath; }