Skip to main content
otavios60241350
Level 2
May 2, 2018 1:51 PM UTC

Asset direct link is downloading not open asset on new tab

Hi, I have a file on this path http://localhost:4502/assetdetails.html/content/dam/we-retail/en/activities/hiking/hiking_5.jpg,​ when I try to access the file by direct link like this: http://localhost:4502/content/dam/we-retail/en/activities/hiking/hiking_5.jpg the file is download but It should open on browser windows not do download direct.  What are happening? The response header might be wrong how can I fix it?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

21 replies

smacdonald2008
Level 10
May 2, 2018 3:28 PM UTC

This is confirmed - on AEM 6.2 - the URL opened the image in the browser. In AEM 6.4 - it downloads the file. Checking to see if this is normal behavior or a bug.

Translate
otavios60241350
Level 2
May 2, 2018 4:02 PM UTC

Thanks smacdonald2008​, please let me know if you have any update about it.

Translate
smacdonald2008
Level 10
May 2, 2018 5:48 PM UTC

Our support team is investigating this. I will post back what they say.

Translate
Adobe Employee
May 4, 2018 6:34 AM UTC

This was a security fix at Sling level, the disposition filter has been added to force this behavior. See [0].

To undo this behavior (not recommended), you can disable the component[1].

Thanks

[0] SLING-4883Extend content disposition filter protection to jcr:data

[1] org.apache.sling.security.impl.ContentDispositionFilter

[2] http://10.42.36.65:4502/system/console/components/org.apache.sling.security.impl.ContentDispositionFilter

Translate
otavios60241350
Level 2
May 4, 2018 12:31 PM UTC

So, ashu4pma​, what you recommend to do? I need have a direct link for a .mp4 video  hosted on /content/dam for exemplo and it should play direct browser like this https://www.w3schools.com/html/mov_bbb.mp4, just disable the Content Disposition Filter?

What happend if I just uncheck "Enable For All Resource Paths", will it have any side effects?

Translate
Adobe Employee
May 7, 2018 7:18 AM UTC

Yes uncheck the checkbox(Enable Content Disposition for all paths).

Translate
Ravi_S
Level 2
Nov 27, 2018 12:19 AM UTC

Circling back to this thread here. PDF's are downloading on to a local browser. Updating/Disabling the disposition filters are not helping either? What else do i need to do?

Translate
Level 2
Dec 7, 2018 8:57 AM UTC

Any update here?

I tried to add a robots.txt and it is being downloaded yet. I know that there are different ways to show a robots.txt but the simpliest way is to put in the dam and just configure a rule mapping, but this easiest way does not work because this issue.

Does anyone has solved it?

Translate
arvindp66202646
Level 2
Jan 21, 2020 10:48 AM UTC

Dear Team,

 

I am facing same issue in AEM 6.5 (without any service packs). I tried all possible tricks with Content Disposition filter like check/uncheck flag , putting proper values in included resource paths , but still it downloads my video assets rather than streaming in browser.

I am referring video assets through direct DAM link .

 

May I request if someone can be able to help me out here .

 

Thanks in advance.

 

Translate
Feb 20, 2020 4:14 PM UTC

We recently upgraded from 6.3 to 6.5 and facing the same issue. The pdf files, robot.txt and sitemap.xml were opening on the browser window on 6.3 version is downloading the files on 6.5 version. I have tried unchecking the "Enable For All Resource Paths" on the content disposition filter and also added the absolute path on "Included Resource Paths & Content Types" fields. Nothing works. Does anyone have solution??

Translate
Riju-Mahna
Level 2
Feb 26, 2020 7:59 PM UTC

I used the solution for PDF's from this thread. It works only via a dispatcher, though. But it works like a miracle.

https://experienceleaguecommunities.adobe.com/t5/Adobe-Experience-Manager/PDF-from-dispatchers-should-open-in-browser-without-direct/qaq-p/301074

 

The Disposition Filter in AEM is pretty useless (and pathetic) for all these scenarios. Not sure what is the purpose of that filter.

Translate
Mar 9, 2020 9:27 AM UTC

Thanks! I finally found a solution for robots.txt issue. Actually it works for all types of assets, just need to change pdf to your format (e.g. txt, png, mp4, etc).

Translate