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
This commit is contained in:
Francesco Mangiacrapa 2019-04-04 10:52:19 +00:00
parent 22074fee73
commit 9add4d4413
1 changed files with 4 additions and 1 deletions

View File

@ -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());