Asset direct link is downloading not open asset on new tab | Community
Skip to main content
otavios60241350
Level 2
May 2, 2018

Asset direct link is downloading not open asset on new tab

  • May 2, 2018
  • 5 replies
  • 32490 views

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.

5 replies

smacdonald2008
Level 10
May 2, 2018

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.

otavios60241350
Level 2
May 2, 2018

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

smacdonald2008
Level 10
May 2, 2018

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

Adobe Employee
May 4, 2018

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

otavios60241350
Level 2
May 4, 2018

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?

Adobe Employee
May 7, 2018

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

Ravi_S
Level 2
November 27, 2018

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?

Level 2
December 7, 2018

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?

arvindp66202646
Level 2
January 21, 2020

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.

 

February 20, 2020

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??

Riju-Mahna
Level 2
February 26, 2020

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.

March 9, 2020

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).