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.HttpServletServlet 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.pdf
or/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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DownloadContentServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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, service
-
-
-
-
Method Detail
-
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)
-
-