commented fileSize in the `uploadFile` and `uploadArchive`

This commit is contained in:
Francesco Mangiacrapa 2024-07-30 15:38:43 +02:00
parent 45978147c0
commit 7415ba5ae6
3 changed files with 13 additions and 7 deletions

View File

@ -506,11 +506,15 @@ public class StorageHubClientService {
setContextProviders(scope, authorizationToken);
FileContainer fileCont = null;
fileCont = shClient.open(folderId).asFolder().uploadFile(is, fileName, fileDescription);
//TODO UNCOMMENT THIS CODE WHEN FILE SIZE IS OK
/*
if (fileSize == null)
fileCont = shClient.open(folderId).asFolder().uploadFile(is, fileName, fileDescription);
else
fileCont = shClient.open(folderId).asFolder().uploadFile(is, fileName, fileDescription, fileSize);
*/
return fileCont.get();
}
@ -571,10 +575,12 @@ public class StorageHubClientService {
setContextProviders(scope, authorizationToken);
FolderContainer folderCont = null;
if (fileSize == null)
folderCont = shClient.open(folderId).asFolder().uploadArchive(is, extractionFolderName);
else
folderCont = shClient.open(folderId).asFolder().uploadArchive(is, extractionFolderName, fileSize);
folderCont = shClient.open(folderId).asFolder().uploadArchive(is, extractionFolderName);
//TODO UNCOMMENT THIS CODE WHEN FILE SIZE IS OK
// if (fileSize == null)
// folderCont = shClient.open(folderId).asFolder().uploadArchive(is, extractionFolderName);
// else
// folderCont = shClient.open(folderId).asFolder().uploadArchive(is, extractionFolderName, fileSize);
return folderCont.get();
}

View File

@ -655,7 +655,7 @@ public final class WorkspaceStorageHubClientService implements Workspace{
*/
@Override
public WorkspaceItem uploadFile(
String folderId, InputStream is, String fileName, String fileDescription, long fileSize)
String folderId, InputStream is, String fileName, String fileDescription, Long fileSize)
throws Exception {
LOGGER.debug("called upload File");

View File

@ -186,7 +186,7 @@ public interface Workspace {
* @throws Exception the exception
*/
public WorkspaceItem uploadFile(String folderId, InputStream inputStream, String fileName, String fileDescription,
long fileSize) throws Exception;
Long fileSize) throws Exception;
/**
* Gets the shared folder members.