When downloading a file that is directly uploaded to a Download component, the filename put into the Content-Disposition header is prepended with /, which results in the file being downloaded (at least in Chrome) with a prefixed _ character. i.e. file name uploaded = "myfile.txt", but downloads as "_myfile.txt"
The issue appears to be in com.adobe.cq.wcm.core.components.internal.servlets.DownloadServlet
In the doGet function,
if (asset == null) {
String filename = request.getRequestPathInfo().getSuffix();
Should be updated to
if (asset == null) {
String filename = StringUtils.removeStart(request.getRequestPathInfo().getSuffix(), '/');
Bug Version: 2.24.7-SNAPSHOT
When downloading a file that is directly uploaded to a Download component, the filename put into the
Content-Disposition
header is prepended with/
, which results in the file being downloaded (at least in Chrome) with a prefixed_
character. i.e. file name uploaded = "myfile.txt", but downloads as "_myfile.txt"The issue appears to be in com.adobe.cq.wcm.core.components.internal.servlets.DownloadServlet
In the
doGet
function,Should be updated to