From 9add4d4413c59f2647f9efcee99c118e69cb13eb Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Thu, 4 Apr 2019 10:52:19 +0000 Subject: [PATCH] Fixing Support #16430 git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@178832 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../portlets/user/workspace/server/DownloadServlet.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gcube/portlets/user/workspace/server/DownloadServlet.java b/src/main/java/org/gcube/portlets/user/workspace/server/DownloadServlet.java index f018c46..4baf2ef 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/server/DownloadServlet.java +++ b/src/main/java/org/gcube/portlets/user/workspace/server/DownloadServlet.java @@ -296,7 +296,10 @@ public class DownloadServlet extends HttpServlet{ String itemName = MimeTypeUtil.getNameWithExtension(descr.getItemName(), workspaceFileItem.getMimeType()); logger.info("Downloading default item: "+workspaceFileItem); - String contentDisposition = viewContent?"inline":"attachment"; + //String contentDisposition = viewContent?"inline":"attachment"; + //Support #16430 + //The 'inline' option may be badly managed by browser, so I'm forcing the 'attachment' option + String contentDisposition = "attachment"; resp.setHeader("Content-Disposition", contentDisposition+"; filename=\"" + itemName + "\"" ); if(workspaceFileItem.getSize()!=null && workspaceFileItem.getSize()>0) resp = setContentLength(resp, workspaceFileItem.getSize());