use of io.minio.RemoveObjectArgs in project fess by codelibs.
the class AdminStorageAction method deleteObject.
public static void deleteObject(final String objectName) {
try {
final FessConfig fessConfig = ComponentUtil.getFessConfig();
final MinioClient minioClient = createClient(fessConfig);
final RemoveObjectArgs args = RemoveObjectArgs.builder().bucket(fessConfig.getStorageBucket()).object(objectName).build();
minioClient.removeObject(args);
} catch (final Exception e) {
throw new StorageException("Failed to delete " + objectName, e);
}
}
Aggregations