Highlighted

Asset direct link is downloading not open asset on new tab

otavios60241350

02-05-2018

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?

Replies

Highlighted

smacdonald2008

02-05-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.

Highlighted

ashu4pma

03-05-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.ContentDispositionF...

Highlighted

otavios60241350

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