Esta conversación ha sido bloqueada debido a la inactividad. Cree una nueva publicación.
Nivel 1
Nivel 2
Iniciar sesión en la comunidad
Iniciar sesión para ver todas las insignias
Esta conversación ha sido bloqueada debido a la inactividad. Cree una nueva publicación.
Hello Team,
Since AEM (6.5 in my case) by default downloads DAM PDFs.
We added below lines and we can view PDFs upon clicking.
<LocationMatch "\.(?i:pdf)$">
ForceType application/pdf
Header set Content-Disposition inline
</LocationMatch>
PROBLEM:
We also have to give way to download as an option. so for that, created Servlet (Code Below) and set Content-Disposition as "attachment". When we try to access PDF using "docdown" selector directly from Publish Machine, It downloads.
where as from Dispatcher URL, It always show "inline" and It does not download, always open in view mode.
Code Below:
@SlingServletResourceTypes(resourceTypes = "dam:Asset", methods = HttpConstants.METHOD_GET, selectors = "docdown", extensions = "pdf")
@ServiceDescription("Download PDF Servlet")
public class DownloadPDFServlet extends SlingSafeMethodsServlet {
¡Resuelto! Ir a solución.
Vistas
Respuestas
Total de me gusta
We fixed using below:
<LocationMatch "^((?!docdown).)*\.pdf$">
ForceType application/pdf
Header set Content-Disposition inline
</LocationMatch>
Vistas
Respuestas
Total de me gusta
We fixed using below:
<LocationMatch "^((?!docdown).)*\.pdf$">
ForceType application/pdf
Header set Content-Disposition inline
</LocationMatch>
Vistas
Respuestas
Total de me gusta
@arvind Tthank you for sharing the solution with the AEM community. This would help the community in posterity.
Vistas
Respuestas
Total de me gusta
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas