ref #11879: TDM - Update to StorageHUB
https://support.d4science.org/issues/#11879 Updated to StorageHub git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@171469 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
2e00334667
commit
bf57479c64
|
@ -246,7 +246,10 @@ public class FilesStorage {
|
|||
IClient client = new StorageClient(user, AccessType.PUBLIC, MemoryType.VOLATILE).getClient();
|
||||
|
||||
try (InputStream is = client.get().RFileAsInputStream(storageId)) {
|
||||
|
||||
if(is==null){
|
||||
logger.error("Error in storage input stream is null for storageId :"+storageId);
|
||||
throw new TDGWTServiceException("Error in storage input stream is null for storageId :"+storageId);
|
||||
}
|
||||
StorageHubClient shc = new StorageHubClient();
|
||||
FolderContainer folderContainer = shc.open(folderId).asFolder();
|
||||
FileContainer fileContainer = folderContainer.uploadFile(is, name, description);
|
||||
|
|
Loading…
Reference in New Issue