BUGFIX: 隐藏加载不出minio的相关数据;

This commit is contained in:
shahaibo
2025-03-12 21:26:24 +08:00
parent 377c86e390
commit 6fc22784b8
4 changed files with 65 additions and 27 deletions

View File

@@ -440,6 +440,16 @@ public class MinioUtil {
return getPreSignedUrl(bucketName, String.valueOf(fileName), expiry);
}
public boolean doesObjectExist(String path) {
if (!path.contains("/")) {
throw new BusinessException("the.path.is.error");
}
int index = path.indexOf("/");
String bucketName = path.substring(0, index);
String objectName = path.substring(index + 1);
return doesObjectExist(bucketName, objectName);
}
public boolean doesObjectExist(String bucketName, String objectName) {
try {
minioClient.statObject(