From 47f37eb0f06ddc7e5cbdb19e146d7e38d690162d Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Tue, 13 May 2014 12:35:48 +0000 Subject: [PATCH] Minor Update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@95623 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../server/storage/FilesStorage.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/storage/FilesStorage.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/storage/FilesStorage.java index 2fc2b4d..9e4d02f 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/storage/FilesStorage.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/storage/FilesStorage.java @@ -35,20 +35,20 @@ public class FilesStorage { .getLogger(FilesStorage.class); public String storageCSVTempFile(String user, File file) { - String url=null; + String url = null; try { - - IClient client = new StorageClient(user, AccessType.PUBLIC, - MemoryType.VOLATILE).getClient(); - String remotePath = "/CSVimport/" + file.getName(); - logger.debug("remotePath: " + remotePath); - client.put(true).LFile(file.getAbsolutePath()).RFile(remotePath); - url = client.getUrl().RFile(remotePath); - } catch(Throwable e){ - logger.error("Error no csv file loaded on storage"+e.getLocalizedMessage()); + IClient client = new StorageClient(user, AccessType.PUBLIC, + MemoryType.VOLATILE).getClient(); + String remotePath = "/CSVimport/" + file.getName(); + logger.debug("remotePath: " + remotePath); + client.put(true).LFile(file.getAbsolutePath()).RFile(remotePath); + url = client.getUrl().RFile(remotePath); + } catch (Throwable e) { + logger.error("Error no csv file loaded on storage" + + e.getLocalizedMessage()); e.printStackTrace(); } - + return url; }