Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect file name from Download component for "inline" asset #2751

Open
HitmanInWis opened this issue May 7, 2024 · 0 comments
Open

Incorrect file name from Download component for "inline" asset #2751

HitmanInWis opened this issue May 7, 2024 · 0 comments

Comments

@HitmanInWis
Copy link

Bug present as of version: 2.24.7-SNAPSHOT

If my Download component references a PPTX file (a file my browser doesn't know how to display "inline") but the user selects the "Display inline" option on the dialog anyway, when my browser attempts to open the file and instead downloads it (because it doesnt know how to inline it) I get a filename with the selectors used by the Download servlet: <filename>.pptx.coredownload.inline.pptx. The file instead should download with the same file name as if it was not being inlined - i.e. <filename>.pptx.

Bug file: com.adobe.cq.wcm.core.components.internal.servlets.DownloadServlet

Change the following line:

            response.setHeader(CONTENT_DISPOSITION_HEADER, "inline");

to:

            response.setHeader(CONTENT_DISPOSITION_HEADER, "inline; filename=\"" + filename + "\"");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant