USING the baseName instead of itemName in oder to avoid adding extension as suffix
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-uploader@171887 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b4adb4d065
commit
a7f03e20a7
|
@ -494,7 +494,6 @@ 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
|
//USING isOverwrite to check if the file already exists
|
||||||
try {
|
try {
|
||||||
isOverwrite = storageHubWrapper.getWorkspace().exists(itemName, destinationFolder.getId());
|
isOverwrite = storageHubWrapper.getWorkspace().exists(itemName, destinationFolder.getId());
|
||||||
|
@ -528,10 +527,8 @@ public class WorkspaceUploadServletStream extends HttpServlet implements Servlet
|
||||||
if (isSupportedArchive){ //Uploading Archive OK
|
if (isSupportedArchive){ //Uploading Archive OK
|
||||||
|
|
||||||
logger.debug("Supported archive " +uploadItem.getContentType() +" for unpacking");
|
logger.debug("Supported archive " +uploadItem.getContentType() +" for unpacking");
|
||||||
workspaceUploader = WorkspaceUploaderMng.uploadArchive(storageHubWrapper, user, scopeGroupId, workspaceUploader, request, itemName, inputStream, destinationFolder, size);
|
//USING the baseName instead of itemName in oder to avoid adding extension as suffix
|
||||||
// if (MimeTypeUtil.isZipContentType(uploadItem.getContentType())){ //UNZIP??
|
workspaceUploader = WorkspaceUploaderMng.uploadArchive(storageHubWrapper, user, scopeGroupId, workspaceUploader, request, baseName, inputStream, destinationFolder, size);
|
||||||
// logger.debug("Unziping content");
|
|
||||||
// //THE WORKSPACE HAS BEEN INSTANCIED ABOVE
|
|
||||||
|
|
||||||
if(workspaceUploader==null)
|
if(workspaceUploader==null)
|
||||||
throw new Exception("Error when creating uploader, it is null!");
|
throw new Exception("Error when creating uploader, it is null!");
|
||||||
|
|
Loading…
Reference in New Issue