This commit is contained in:
Luke.Ye 2025-07-10 23:59:58 +08:00
parent 3cf63bb70c
commit b3f988dc17

View File

@ -52,11 +52,11 @@ public class MinioOSGatewayImpl implements ObjectStorageGateway {
@Override
public void ensureBucketExists(String bucket) throws Exception {
boolean exists = minioClient.bucketExists(
boolean exists = localMinioClient.bucketExists(
BucketExistsArgs.builder().bucket(bucket).build()
);
if (!exists) {
minioClient.makeBucket(MakeBucketArgs.builder().bucket(bucket).build());
localMinioClient.makeBucket(MakeBucketArgs.builder().bucket(bucket).build());
log.info("已创建 bucket: {}", bucket);
}
}
@ -84,7 +84,7 @@ public class MinioOSGatewayImpl implements ObjectStorageGateway {
return String.format("http://s3.wisdompulse.cn/%s/%s", bucket, objectPath);
} else {
// 生成预签名链接最大 7
return minioClient.getPresignedObjectUrl(
return localMinioClient.getPresignedObjectUrl(
GetPresignedObjectUrlArgs.builder()
.method(Method.GET)
.bucket(bucket)
@ -103,7 +103,7 @@ public class MinioOSGatewayImpl implements ObjectStorageGateway {
}
try {
Iterable<Result<DeleteError>> results = minioClient.removeObjects(
Iterable<Result<DeleteError>> results = localMinioClient.removeObjects(
RemoveObjectsArgs.builder()
.bucket(bucket)
.objects(objectPaths.stream()