bug fixing #19232
This commit is contained in:
parent
71cbb456eb
commit
d9c3c710f2
|
@ -11,6 +11,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
[#19243] upload archive facility does not work properly with Windows OS
|
||||
|
||||
[#19232] manage file names that use special characters
|
||||
|
||||
## [2.0.4] - 2019-12-19
|
||||
|
||||
**Notes**
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
component="org.gcube.portlets-widgets.workspace-uploader.2-0-5"
|
||||
date="2020-05-14">
|
||||
<Change>[Bug #19243] upload archive facility does not work properly
|
||||
with Windows OS</Change>
|
||||
with Windows OS
|
||||
</Change>
|
||||
<Change>[Task #19232] manage file names that use special characters
|
||||
</Change>
|
||||
</Changeset>
|
||||
<Changeset
|
||||
component="org.gcube.portlets-widgets.workspace-uploader.2-0-4"
|
||||
|
|
|
@ -45,7 +45,6 @@ import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.InsufficientPri
|
|||
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.InternalErrorException;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.ItemAlreadyExistException;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.ItemNotFoundException;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.WrongItemTypeException;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.ConstantsWorkspaceUploader;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.server.notification.NotificationsWorkspaceUploader;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.server.notification.NotificationsWorkspaceUploaderProducer;
|
||||
|
@ -526,15 +525,17 @@ public class WorkspaceUploadServletStream extends HttpServlet implements Servlet
|
|||
inputStream.addListener(uploadProgressListener);
|
||||
workspaceUploader.setUploadProgress(uploadProgressListener.getUploadProgress());
|
||||
|
||||
//USING isOverwrite to check if the file already exists
|
||||
try {
|
||||
isOverwrite = storageHubWrapper.getWorkspace().exists(itemName, destinationFolder.getId());
|
||||
workspaceUploader.setIsOverwrite(isOverwrite);
|
||||
logger.info("The file: "+itemName+ " exists in the folder? "+isOverwrite);
|
||||
saveWorkspaceUploaderInSession(workspaceUploader, request.getSession());
|
||||
}catch (ItemNotFoundException | WrongItemTypeException e) {
|
||||
logger.warn("Error on checking if the file: "+itemName+" exists in the folder id: "+ destinationFolder.getId());
|
||||
}
|
||||
|
||||
//Commented this. FIXING ISSUE #19232
|
||||
// try {
|
||||
// //USING isOverwrite to check if the file already exists
|
||||
// isOverwrite = storageHubWrapper.getWorkspace().exists(itemName, destinationFolder.getId());
|
||||
// workspaceUploader.setIsOverwrite(isOverwrite);
|
||||
// logger.info("The file: "+itemName+ " exists in the folder? "+isOverwrite);
|
||||
// saveWorkspaceUploaderInSession(workspaceUploader, request.getSession());
|
||||
// }catch (ItemNotFoundException | WrongItemTypeException e) {
|
||||
// logger.warn("Error on checking if the file: "+itemName+" exists in the folder id: "+ destinationFolder.getId());
|
||||
// }
|
||||
|
||||
saveWorkspaceUploaderInSession(workspaceUploader, request.getSession());
|
||||
|
||||
|
|
Loading…
Reference in New Issue