Serve DAM based html page as html...
Quick question, what needs to be changed to serve html page in DAM as a text/html and not application/save...
Thanks,
Peter
Quick question, what needs to be changed to serve html page in DAM as a text/html and not application/save...
Thanks,
Peter
One of my client had similar requirements and after some analysis(mentioned below) I could render the html from /content/dam path.
So a DAM Asset is served by the BinaryProviderServlet and after doing its own stuff it dispatches the request to another servlet called SafeBinaryGetServlet which will either render the resource or ask the browser to save it based on the mime:type of the resource is in black list or not, since the “text/html” is registered as a blacklist mime type by the SafeBinaryGetServlet. And for that black list it sets a “content-disposition:attachment” header with attachment as an option, its a direction to the browser to download the file and not render it. Hope this is clear till now.
Note: Make sure you do impact analysis of the change I am suggesting below.
Run this curl command to have the configuration removed from OSGI web console.
Or
Directly go to AEM Web console - http://localhost:4502/system/console/configMgr/com.day.cq.dam.core.impl.servlet.SafeBinaryGetServlet
and remove the text/html entry from config, save it.
Also, the better place to put such artefacts is /content/campaign
That way the above mentioned restrictions will not come into picture and the content will be served properly without any explicit changes.
Thanks,
Rakesh
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.