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
|
[#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
|
## [2.0.4] - 2019-12-19
|
||||||
|
|
||||||
**Notes**
|
**Notes**
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
component="org.gcube.portlets-widgets.workspace-uploader.2-0-5"
|
component="org.gcube.portlets-widgets.workspace-uploader.2-0-5"
|
||||||
date="2020-05-14">
|
date="2020-05-14">
|
||||||
<Change>[Bug #19243] upload archive facility does not work properly
|
<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>
|
||||||
<Changeset
|
<Changeset
|
||||||
component="org.gcube.portlets-widgets.workspace-uploader.2-0-4"
|
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.InternalErrorException;
|
||||||
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.ItemAlreadyExistException;
|
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.ItemNotFoundException;
|
||||||
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.WrongItemTypeException;
|
|
||||||
import org.gcube.portlets.widgets.workspaceuploader.client.ConstantsWorkspaceUploader;
|
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.NotificationsWorkspaceUploader;
|
||||||
import org.gcube.portlets.widgets.workspaceuploader.server.notification.NotificationsWorkspaceUploaderProducer;
|
import org.gcube.portlets.widgets.workspaceuploader.server.notification.NotificationsWorkspaceUploaderProducer;
|
||||||
|
@ -526,15 +525,17 @@ public class WorkspaceUploadServletStream extends HttpServlet implements Servlet
|
||||||
inputStream.addListener(uploadProgressListener);
|
inputStream.addListener(uploadProgressListener);
|
||||||
workspaceUploader.setUploadProgress(uploadProgressListener.getUploadProgress());
|
workspaceUploader.setUploadProgress(uploadProgressListener.getUploadProgress());
|
||||||
|
|
||||||
//USING isOverwrite to check if the file already exists
|
|
||||||
try {
|
//Commented this. FIXING ISSUE #19232
|
||||||
isOverwrite = storageHubWrapper.getWorkspace().exists(itemName, destinationFolder.getId());
|
// try {
|
||||||
workspaceUploader.setIsOverwrite(isOverwrite);
|
// //USING isOverwrite to check if the file already exists
|
||||||
logger.info("The file: "+itemName+ " exists in the folder? "+isOverwrite);
|
// isOverwrite = storageHubWrapper.getWorkspace().exists(itemName, destinationFolder.getId());
|
||||||
saveWorkspaceUploaderInSession(workspaceUploader, request.getSession());
|
// workspaceUploader.setIsOverwrite(isOverwrite);
|
||||||
}catch (ItemNotFoundException | WrongItemTypeException e) {
|
// logger.info("The file: "+itemName+ " exists in the folder? "+isOverwrite);
|
||||||
logger.warn("Error on checking if the file: "+itemName+" exists in the folder id: "+ destinationFolder.getId());
|
// 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());
|
saveWorkspaceUploaderInSession(workspaceUploader, request.getSession());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue