Package org.alfresco.web.app.servlet
Class DownloadContentServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.alfresco.web.app.servlet.DownloadContentServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
public class DownloadContentServlet
extends jakarta.servlet.http.HttpServlet
Servlet responsible for streaming node content from the repo directly to the response stream.
The appropriate mimetype is calculated based on filename extension.
The URL to the servlet should be generated thus:
/alfresco/download/attach/workspace/SpacesStore/0000-0000-0000-0000/myfile.pdfor
/alfresco/download/direct/workspace/SpacesStore/0000-0000-0000-0000/myfile.pdf
The 'attach' or 'direct' element is used to indicate whether to display the stream directly in the browser or download it as a file attachment.
Since ACS 6.X, this Servlet redirects to GET /nodes/{nodeId}/content V1 REST API.
- Author:
- Kevin Roast, gavinc
- See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
DownloadContentServlet
public DownloadContentServlet()
-
-
Method Details
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws IOException - Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Throws:
IOException- See Also:
-
HttpServlet.doGet(HttpServletRequest, HttpServletResponse)
-