Cette conversation a été verrouillée en raison de son inactivité. Veuillez créer une nouvelle publication.
Niveau 1
Niveau 2
Se connecter à la communauté
Connectez-vous pour voir tous les badges
Cette conversation a été verrouillée en raison de son inactivité. Veuillez créer une nouvelle publication.
Hi everyone,
We have came across an unexpected behavior when requesting a thumbnail image for a content fragment.
Where instead of displaying the thumbnail image in the browser its being downloaded. Upon further investigation, I believe this is caused by the header present in the response "Content-Disposition: attachment"
Which is asking the browser to download the image instead of displaying as inline.
Is there any other way how to get the image path, which can be used as reference?
Is there a settings which could be changed to remove this header without impacting the platform security?
The current path example for the thumbnail image:
http://localhost:4502/content/dam/test/content-fragment/cf_sample1/_jcr_content/thumbnail.png
Résolu ! Accéder à la solution.
Vues
Réponses
Nombre de J’aime
Hi @ZdenekK ,
There are two ways to fix this. You can write a rule at dispatcher rule so that this header will be updated from attachment to inline like this.
<LocationMatch "\.(?i:txt)|(?i:pdf)|(?i:xml)|(?i:png)$">. -->add all your extensions here
Header set Content-Disposition inline
</LocationMatch>
The other approach is to put the configuration in Apache Sling Content Disposition Filter which is an OOTB service in AEM. Please refer to this: https://aem4beginner.blogspot.com/aem-pdf-is-getting-downloaded-instead
Vues
Réponses
Nombre de J’aime
Hi @ZdenekK ,
There are two ways to fix this. You can write a rule at dispatcher rule so that this header will be updated from attachment to inline like this.
<LocationMatch "\.(?i:txt)|(?i:pdf)|(?i:xml)|(?i:png)$">. -->add all your extensions here
Header set Content-Disposition inline
</LocationMatch>
The other approach is to put the configuration in Apache Sling Content Disposition Filter which is an OOTB service in AEM. Please refer to this: https://aem4beginner.blogspot.com/aem-pdf-is-getting-downloaded-instead
Vues
Réponses
Nombre de J’aime
Thank you @Anish-Sinha for the quick reply
Vues
Réponses
Nombre de J’aime
Vues
Likes
Réponses
Vues
Likes
Réponses