public class UploadContentServlet extends BaseServlet
The URL to the servlet should be generated thus:
/alfresco/upload/workspace/SpacesStore/0000-0000-0000-0000/myfile.pdfor
/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.
BaseServlet.PathRefInfo
Modifier and Type | Field and Description |
---|---|
protected static String |
ARG_ENCODING |
protected static String |
ARG_LOCALE |
protected static String |
ARG_MIMETYPE |
protected static String |
ARG_PROPERTY
Argument properties
|
protected static String |
MIMETYPE_OCTET_STREAM
Default mime type
|
FACES_SERVLET, KEY_ROOT_PATH, KEY_STORE
Constructor and Description |
---|
UploadContentServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
doPut(HttpServletRequest req,
HttpServletResponse res) |
checkAccess, getServiceRegistry, redirectToLoginPage, redirectToLoginPage, resolveNamePath, resolveWebDAVPath, resolveWebDAVPath, resolveWebDAVPath, resolveWebDAVPath, servletAuthenticate, servletAuthenticate, setNoCacheHeaders, validRedirectJSP
doDelete, doGet, doHead, doOptions, doPost, doTrace, getLastModified, service, service
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
protected static final String MIMETYPE_OCTET_STREAM
protected static final String ARG_PROPERTY
protected static final String ARG_MIMETYPE
protected static final String ARG_ENCODING
protected static final String ARG_LOCALE
protected void doPut(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
doPut
in class HttpServlet
ServletException
IOException
HttpServlet.doPut(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
Copyright © 2005–2017 Alfresco Software. All rights reserved.