Content Disposition on AEM as Cloud | Community
Skip to main content
Asutosh_Jena_
Community Advisor
Community Advisor
December 28, 2021
Solved

Content Disposition on AEM as Cloud

  • December 28, 2021
  • 2 replies
  • 9943 views

I am trying to open the PDFs in browser instead of downloading the PDF.

So far I have configured the ContentDispositionFilter with the below properties and it works perfectly fine.

{
"sling.content.disposition.paths": "/content/*:application/pdf",
"sling.content.disposition.all.paths": "false"
}

When I check the same functionality on AEM as Cloud I see the below additional headers are added and the PDF is downloaded.

content-disposition:
attachment; filename="Z571_MPS130_01eA.pdf"; filename*=UTF-8''Z571_MPS130_01eA.pdf
 
Can anyone point out what am I missing here and where these additional headers are getting added?
 
Thanks!

 

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

Hi @asutosh_jena_ ,

 

As per below link, Content disposition filter is not supported in AEMaaCS.

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/assets-cloud-changes.html?lang=en 

 

 

So set the disposition setting in dispatcher config.

 

<LocationMatch "\.(?i:pdf)$">
  ForceType application/pdf
  Header set Content-Disposition inline
</LocationMatch>

 

2 replies

arunpatidar
Community Advisor
Community Advisor
December 28, 2021

Hi @asutosh_jena_ 
I would suggest to check the dispatcher and apache config here.

You can remove this headers from dispatcher also.

 

For cached file I am not sure if publihser would remove those headers.

Arun Patidar
Kishore_Kumar_
Kishore_Kumar_Accepted solution
Level 9
December 28, 2021

Hi @asutosh_jena_ ,

 

As per below link, Content disposition filter is not supported in AEMaaCS.

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/assets-cloud-changes.html?lang=en 

 

 

So set the disposition setting in dispatcher config.

 

<LocationMatch "\.(?i:pdf)$">
  ForceType application/pdf
  Header set Content-Disposition inline
</LocationMatch>

 

Asutosh_Jena_
Community Advisor
Community Advisor
December 28, 2021

@kishore_kumar_ Thanks for the response. I was looking for any type of OSGi config without updating anything on the dispatcher but it does not look like an option in AEM as Cloud Service anymore!