Content-Disposition Header

Avatar

Avatar
Validate 1
Level 2
atulj76172708
Level 2

Likes

8 likes

Total Posts

34 posts

Correct reply

6 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
Level 2
atulj76172708
Level 2

Likes

8 likes

Total Posts

34 posts

Correct reply

6 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
atulj76172708
Level 2

10-01-2017

I have some html stored under /etc/library/module/ 

when I access these files on AEM 6.2 directly on Server i.e. https://localhost:4502/etc/library/module/module.html

It download's the file instead of opening it in the browser.

Looked at the response header it shows Content-Disposition : attachment.

In 6.0 we have com.day.cq.dam.core.impl.servlet.SafeBinaryGetServlet to control this header.

However in 6.2 this component seems to have deprecated

Can anyone help me to understand how this content-disposition header be controlled in AEM 6.2? 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
MVP
bsloki
MVP

Likes

182 likes

Total Posts

1,859 posts

Correct reply

545 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 50
Boost 5
View profile

Avatar
Validate 25
MVP
bsloki
MVP

Likes

182 likes

Total Posts

1,859 posts

Correct reply

545 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 50
Boost 5
View profile
bsloki
MVP

10-01-2017

Hi,

Check if this works for you.

Apache Sling Content Disposition Filter (org.apache.sling.security.impl.ContentDispositionFilter)

Answers (6)

Answers (6)

Avatar

Avatar
Validate 1
Level 1
robertb4929173
Level 1

Likes

2 likes

Total Posts

5 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
robertb4929173
Level 1

Likes

2 likes

Total Posts

5 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
robertb4929173
Level 1

20-09-2018

priyajoshi

Remove the text/html form the Dam Safe Binary Filter osgi configuration

Avatar

Avatar
Validate 1
Level 1
robertb4929173
Level 1

Likes

2 likes

Total Posts

5 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
robertb4929173
Level 1

Likes

2 likes

Total Posts

5 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
robertb4929173
Level 1

20-09-2018

atulj26424737 Try adding this Configuration Biding: launchpad:resources/install/5/org.apache.sling.security-1.0.18.jar to Apache Sling Content Disposition Filter

Avatar

Avatar
Validate 25
MVP
bsloki
MVP

Likes

182 likes

Total Posts

1,859 posts

Correct reply

545 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 50
Boost 5
View profile

Avatar
Validate 25
MVP
bsloki
MVP

Likes

182 likes

Total Posts

1,859 posts

Correct reply

545 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 50
Boost 5
View profile
bsloki
MVP

10-01-2017

Add the path which you want to exclude in the above configuration

Avatar

Avatar
Level 1
priyajoshi
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
priyajoshi
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
priyajoshi
Level 1

30-07-2018

just unchecking the Enable Content Disposition for all paths . Still File is getting downloaded

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,205 likes

Total Posts

6,410 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,205 likes

Total Posts

6,410 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

11-01-2017

atulj26424737 wrote...

Thank you Lokesh..

Solution of adding an individual .html file works. However I have 20+ odd files which I'll need to add to this filter.

http://grepcode.com/file/repo1.maven.org/maven2/org.apache.sling/org.apache.sling.security/1.0.10/or...

looks like this filter does not allow regex patterns (*.html) 

just wondering if there is any alternative solution?

 

 

 

Hi,

As your primary question is answered, i would request you to please close this question and create new question for follow-up questions.

~kautuk 

Avatar

Avatar
Validate 1
Level 2
atulj76172708
Level 2

Likes

8 likes

Total Posts

34 posts

Correct reply

6 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
Level 2
atulj76172708
Level 2

Likes

8 likes

Total Posts

34 posts

Correct reply

6 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
atulj76172708
Level 2

10-01-2017

Thank you Lokesh..

Solution of adding an individual .html file works. However I have 20+ odd files which I'll need to add to this filter.

http://grepcode.com/file/repo1.maven.org/maven2/org.apache.sling/org.apache.sling.security/1.0.10/or...

looks like this filter does not allow regex patterns (*.html) 

just wondering if there is any alternative solution?