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

This commit is contained in:
shahaibo
2025-03-12 23:22:41 +08:00
parent 79abe93744
commit 575d1492ad
4 changed files with 144 additions and 57 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(