I have a html file which is residing in DAM which is the default page to be displayed from Akamai incase of an error. We don't have sites license and hence this html residing in DAM.
I have the html file now available in DAM like an asset. But when I try to access it through the dispatcher URL, it gets downloaded as a file than opening the page inline in the browser. How can i fix this issue and open that inline instead of downloading?
I tried https://helpx.adobe.com/mt/experience-manager/kb/HTML-file-stored-in-CRX-does-not-open-in-Browser-in... and https://stackoverflow.com/questions/42447453/is-there-a-way-to-upload-html-pages-into-aem-dam
Views
Replies
Total Likes
@P_V_Nair Are you able to view the HTML file in the Browser when you access the AEM instance directly (without the Dispatcher)?
Have you configured the headers section (added "Content-Disposition") in the Dispatcher Configuration as per [1]?
@muskaanchandwani I have verified direct publish instance and there too it is getting downloaded than opening inline. [1] is already covered in our dispatcher, I just verified. So , i think we need to fix this first in direct publish.
I tried what is mentioned here - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/serve-dam-based-html-page-... , but it did not work
I don't think you can render the asset directly. You would need a renderer that can use this asset URL to render.
@digarg31 Do you mean to say a renderer component using Sites? We don't have sites license and not planning to create any page component to do this. I have seen blogs as in the links above seeing users have done this by opening html pages from assets inline. But that same configuration change is not working for me.
@Nitin_laad Thank you for your reply. I have seen in some posts - Is there a way to upload html pages into AEM DAM - Stack Overflow
and
that this is possible by changing the configuration, Dam Safe Binary Filter(com.day.cq.dam.core.impl.servlet.DamContentDispositionFilter .
But , I tried the same in 6.5 and it doesn't work.
Hi @P_V_Nair Before replying, I had tried the given solution and it did not work for me either. Before implementing, you should review the following references -
if you still want to go with your use case you can try it at dispatcher level.
ie-
<LocationMatch "\.(?i:html)$"> ForceType text/html Header set Content-Disposition inline </LocationMatch>
I would recommend you to raise a ticket to Adobe and get it confirm before going with this implementation.
Thanks @Nitin_laad We are not into cloud as a service yet. We are on managed services. I can definitely check with Adobe before we go for it.
Can you also help me locate the dispatcher config file should we incorporate this change? Is it the farm file?
It should be httpd.conf
@Nitin_laad I tried hitting direct publish url instead of dispatcher URL and there too it gets downloaded instead of opening inline.
@Nitin_laad I tried this as well in our dispatcher vhost file as below by adding the location match and unfortunately, it still did not work. The html still gets downloaded than opening inline.
@ana_belen_cano_ Unfortunately no. None of the recommendations worked for me and at last we changed the solution to create a simple page component and create a error page in sites to add the same html in there.
Hi, we have resolved problem with this configuration on dispatcher:
<LocationMatch "^/content/dam/.*\.(?i:jpe?g|gif|js|mov|mp4|png|svg|txt|zip|ico|webp|pdf)$">
Header unset "Content-Disposition"
Header set Content-Disposition inline
</LocationMatch>
Our content DAM is now loaded on browser.
Regards.