mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 22:57:17 +08:00 
			
		
		
		
	fix(system/storage): 修复文件路径中存在bucketName返回错误relativePath的问题
This commit is contained in:
		| @@ -172,7 +172,7 @@ public class FileDO extends BaseDO { | |||||||
|         String relativePath = fullPath.startsWith(StringConstants.SLASH) ? fullPath.substring(1) : fullPath; |         String relativePath = fullPath.startsWith(StringConstants.SLASH) ? fullPath.substring(1) : fullPath; | ||||||
|         // 如果路径以 bucketName 开头,则移除 bucketName 例如: bucketName/2024/11/27/ -> 2024/11/27/ |         // 如果路径以 bucketName 开头,则移除 bucketName 例如: bucketName/2024/11/27/ -> 2024/11/27/ | ||||||
|         if (relativePath.startsWith(storageDO.getBucketName())) { |         if (relativePath.startsWith(storageDO.getBucketName())) { | ||||||
|             return StrUtil.split(relativePath, storageDO.getBucketName()).get(1); |             return StrUtil.subAfter(relativePath, storageDO.getBucketName(), false); | ||||||
|         } |         } | ||||||
|         return relativePath; |         return relativePath; | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 九月
					九月