Package org.alfresco.web.app.servlet
Class DownloadContentServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.alfresco.web.app.servlet.DownloadContentServlet
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class DownloadContentServlet
extends javax.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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
Constructor Details
-
DownloadContentServlet
public DownloadContentServlet()
-
-
Method Details
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws IOException - Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
IOException- See Also:
-
HttpServlet.doGet(HttpServletRequest, HttpServletResponse)
-