org.fcrepo.server.upload
Class UploadResource

java.lang.Object
  extended by org.fcrepo.server.rest.BaseRestResource
      extended by org.fcrepo.server.upload.UploadResource

@Component
public class UploadResource
extends BaseRestResource

Enables the upload of temp files for the REST API. Takes a POST request with a message having media type multipart/form-data and consisting of exactly one entity called "file".

Version:
$Id$

Field Summary
 
Fields inherited from class org.fcrepo.server.rest.BaseRestResource
APP_ZIP, FORM, HTML, m_access, m_datastreamFilenameHelper, m_headers, m_hostname, m_management, m_mapper, m_server, m_servletRequest, m_uriInfo, TEXT_HTML, TEXT_XML, VALID_PID_PART, XML, ZIP
 
Constructor Summary
UploadResource(Server server)
           
 
Method Summary
 javax.ws.rs.core.Response upload(org.apache.cxf.jaxrs.ext.multipart.MultipartBody multipart)
          Uploads a file encoded in a multipart/form message.
 
Methods inherited from class org.fcrepo.server.rest.BaseRestResource
buildResponse, getContext, getSerializer, handleException, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UploadResource

public UploadResource(Server server)
Method Detail

upload

public javax.ws.rs.core.Response upload(org.apache.cxf.jaxrs.ext.multipart.MultipartBody multipart)
Uploads a file encoded in a multipart/form message.

Parameters:
multiPart - the multiPart object containing the file to be uploaded
Returns:
a URI with the (custom) uploaded:// scheme and a unique identifier to be used future ingests. Returns 202 if request succeeds


Copyright © 2012 DuraSpace. All Rights Reserved.