From 9f3249946e450a617a61adb6ecede39475928081 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 3 Oct 2018 17:56:20 +0000 Subject: [PATCH] ref 11724: SAI - Update to StorageHUB https://support.d4science.org/issues/11724 Updated to StorageHub git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@171902 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../server/DownloadServlet.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/DownloadServlet.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/DownloadServlet.java index 7fd0055..8427b25 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/DownloadServlet.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/DownloadServlet.java @@ -84,10 +84,11 @@ public class DownloadServlet extends HttpServlet { } String itemId = req.getParameter("itemId"); - logger.info("DownloadServlet(): [scopeGroupId=" + scopeGroupId + ",ItemId=" + itemId + "]"); + logger.info("DownloadServlet() [scopeGroupId=" + scopeGroupId + ",ItemId=" + itemId + "]"); ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(req, scopeGroupId); FilesStorage filesStorage = new FilesStorage(); ItemDownload itemDownload = filesStorage.getItemDownload(serviceCredentials.getUserName(), itemId); + logger.debug("ItemDownload: "+itemDownload); if (itemDownload == null) { logger.error("This type of item does not support download operation"); throw new ServletException("This type of item does not support download operation"); @@ -107,7 +108,7 @@ public class DownloadServlet extends HttpServlet { .getType().compareTo(FolderItem.class.getSimpleName()) == 0) { fileName = "folder.zip"; } else { - fileName = itemDownload.getItemDescription().getName(); + fileName = "filename"; } } else { if (itemDownload.getItemDescription().getType() != null && itemDownload.getItemDescription()