org.alfresco.web.app.servlet
Class UploadContentServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.alfresco.web.app.servlet.BaseServlet
org.alfresco.web.app.servlet.UploadContentServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class UploadContentServlet
- extends BaseServlet
Servlet responsible for streaming content directly into the repository from the PUT request.
The appropriate mimetype is calculated based on filename extension.
The URL to the servlet should be generated thus:
/alfresco/upload/workspace/SpacesStore/0000-0000-0000-0000/myfile.pdf
or
/alfresco/upload/myfile.pdf
If the store and node id are specified in the URL then the content provided will be streamed onto the node
using an updating writer, updating the content property value accordingly.
If only the file name is specified the content will be streamed into the content store and the content data
will be returned in the reposonse. This can then be used to update the value of a content property manually.
Any used content will be cleared up in the usual manner.
By default, the download assumes that the content is on the
content property
.
To set the content of a specific model property, use a 'property' arg, providing the qualified name of the property.
Like most Alfresco servlets, the URL may be followed by a valid 'ticket' argument for authentication:
?ticket=1234567890
Guest access is currently disabled for this servlet.
- See Also:
- Serialized Form
Method Summary |
protected void |
doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
|
Methods inherited from class org.alfresco.web.app.servlet.BaseServlet |
checkAccess, getServiceRegistry, redirectToLoginPage, resolveNamePath, resolveWebDAVPath, resolveWebDAVPath, resolveWebDAVPath, resolveWebDAVPath, servletAuthenticate, servletAuthenticate, setNoCacheHeaders, validRedirectJSP |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIMETYPE_OCTET_STREAM
protected static final java.lang.String MIMETYPE_OCTET_STREAM
- Default mime type
- See Also:
- Constant Field Values
ARG_PROPERTY
protected static final java.lang.String ARG_PROPERTY
- Argument properties
- See Also:
- Constant Field Values
ARG_MIMETYPE
protected static final java.lang.String ARG_MIMETYPE
- See Also:
- Constant Field Values
ARG_ENCODING
protected static final java.lang.String ARG_ENCODING
- See Also:
- Constant Field Values
UploadContentServlet
public UploadContentServlet()
doPut
protected void doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
doPut
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
- See Also:
HttpServlet.doPut(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.