Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@95622 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-05-13 12:35:27 +00:00
parent bfcd1c0617
commit dd73dae332
1 changed files with 9 additions and 1 deletions

View File

@ -35,12 +35,20 @@ public class FilesStorage {
.getLogger(FilesStorage.class);
public String storageCSVTempFile(String user, File file) {
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);
String url = client.getUrl().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;
}