diff --git a/src/main/java/org/gcube/storagehub/StorageHubManagement.java b/src/main/java/org/gcube/storagehub/StorageHubManagement.java index 4f8b8dd..35440dc 100644 --- a/src/main/java/org/gcube/storagehub/StorageHubManagement.java +++ b/src/main/java/org/gcube/storagehub/StorageHubManagement.java @@ -33,6 +33,10 @@ public class StorageHubManagement { protected final StorageHubClient storageHubClient; + public StorageHubClient getStorageHubClient() { + return storageHubClient; + } + protected FileContainer persitedFile; protected String mimeType; @@ -280,7 +284,7 @@ public class StorageHubManagement { persitedFile = getPersistedFile(filename, mimeType); if(persitedFile !=null) { logger.info("Persited file with mimetype {} and name {} was found (id={}). Goign to remove it.", mimeType, filename, persitedFile.getId()); - persitedFile.delete(); + persitedFile.forceDelete(); } } @@ -293,7 +297,7 @@ public class StorageHubManagement { persitedFile = getFileContainer(shubPublicLink); if(persitedFile !=null) { logger.info("Persited file available at {} was found (id={}). Goign to remove it.", shubPublicLink, persitedFile.getId()); - persitedFile.delete(); + persitedFile.forceDelete(); } }