[MAGNOLIA-1347] links to binaries: set the headers properly so that bowsers don't open extra windows Created: 07/Feb/07  Updated: 03/Dec/13  Resolved: 03/Dec/13

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 3.0.1
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Philipp Bärfuss Assignee: Unassigned
Resolution: Outdated Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLDMS-100 DMSDownloadServlet should allow inlin... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

Clicking on an uploaded document in a download paragraphs opens an empty extra window, which is annoying. This mustn't be and can get avoided by setting the headers porperly. I don't know the details but in the dms download servlet it is done correctly.



 Comments   
Comment by Magnolia International [ 07/Feb/07 ]

I think all you need should be
response.setHeader("Content-Disposition", "attachment; filename=");
or
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
and a proper contentType (response.setContentType)

Comment by Jan Haderka [ 08/Aug/08 ]

We could set the header, but is it always desired? What if you want the browser to try to inline certain types of content like pdf? I think if we do this then it should be an option in the dialog so user can choose whether to have this header added or not.

Comment by Magnolia International [ 08/Aug/08 ]

There is a very similar issue in DMS: MGNLDMS-100
In dms, it would be fairly simple to have strategies ("always inline", "always attach", "attach/inline depending on document property". It seems less obvious regarding the website workspace, where things are less structured.

Now, what Boris mentions is maybe simply the fact that these links have a target="_blank", which will still open a blank new window. (and let the browser decide what to do with the given content type, if we don't set the disposition header)

Comment by Philipp Bärfuss [ 03/Dec/13 ]

Hi,

Thanks for reporting and/or commenting on this issue. We are currently reviewing issues that have had no or minimal activity for several years. Magnolia has evolved tremendously since this issue was reported; in order to focus our work, we are closing such issues.

We realize that some of these might still be valid today - and we ask for your cooperation here. In some cases, we will be linking to overarching stories, or simply more up-to-date similar issues. If you believe this issue is still relevant today, please leave a comment below and we will get back to you.

Cheers,

Generated at Mon Feb 12 03:26:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.