mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
94375: Merged DEV (5.0.1) to HEAD-BUG-FIX (5.1/Cloud) 94337: SHA-52: Downloading file via Quick-Share link does not keep international characters in file names Fixed QuickShareContentGet webscript to use correct name for downloaded files. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@95078 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -136,10 +136,10 @@ public class ContentGet extends StreamContent implements ServletContextAware
|
||||
}
|
||||
|
||||
// Stream the content
|
||||
streamContentLocal(req, res, nodeRef, attach, propertyQName);
|
||||
streamContentLocal(req, res, nodeRef, attach, propertyQName, null);
|
||||
}
|
||||
|
||||
private void streamContentLocal(WebScriptRequest req, WebScriptResponse res, NodeRef nodeRef, boolean attach, QName propertyQName) throws IOException
|
||||
protected void streamContentLocal(WebScriptRequest req, WebScriptResponse res, NodeRef nodeRef, boolean attach, QName propertyQName, Map<String, Object> model) throws IOException
|
||||
{
|
||||
String userAgent = req.getHeader("User-Agent");
|
||||
userAgent = userAgent != null ? userAgent.toLowerCase() : "";
|
||||
@@ -160,11 +160,11 @@ public class ContentGet extends StreamContent implements ServletContextAware
|
||||
}
|
||||
}
|
||||
|
||||
streamContent(req, res, nodeRef, propertyQName, attach, name, null);
|
||||
streamContent(req, res, nodeRef, propertyQName, attach, name, model);
|
||||
}
|
||||
else
|
||||
{
|
||||
streamContent(req, res, nodeRef, propertyQName, attach, null, null);
|
||||
streamContent(req, res, nodeRef, propertyQName, attach, null, model);
|
||||
}
|
||||
}
|
||||
}
|
@@ -28,6 +28,7 @@ import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.model.QuickShareModel;
|
||||
import org.alfresco.repo.tenant.TenantUtil;
|
||||
import org.alfresco.repo.tenant.TenantUtil.TenantRunAsWork;
|
||||
import org.alfresco.repo.web.scripts.content.ContentGet;
|
||||
import org.alfresco.repo.web.scripts.content.StreamContent;
|
||||
import org.alfresco.service.cmr.quickshare.InvalidSharedIdException;
|
||||
import org.alfresco.service.cmr.quickshare.QuickShareService;
|
||||
@@ -55,7 +56,7 @@ import org.springframework.web.context.ServletContextAware;
|
||||
* @author janv
|
||||
* @since Cloud/4.2
|
||||
*/
|
||||
public class QuickShareContentGet extends StreamContent implements ServletContextAware
|
||||
public class QuickShareContentGet extends ContentGet implements ServletContextAware
|
||||
{
|
||||
private static final Log logger = LogFactory.getLog(QuickShareContentGet.class);
|
||||
|
||||
@@ -174,6 +175,6 @@ public class QuickShareContentGet extends StreamContent implements ServletContex
|
||||
boolean attach = Boolean.valueOf(req.getParameter("a"));
|
||||
|
||||
// Stream the content
|
||||
streamContent(req, res, nodeRef, propertyQName, attach, null, model);
|
||||
streamContentLocal(req, res, nodeRef, attach, propertyQName, model);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user