org.fcrepo.server.upload
Class UploadResource

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

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
apiAService, apiMService, datastreamFilenameHelper, fedoraServer, fedoraServerHost, FORM, headers, HTML, mapper, servletRequest, TEXT_HTML, TEXT_XML, uriInfo, XML, ZIP
 
Constructor Summary
UploadResource()
           
 
Method Summary
 javax.ws.rs.core.Response upload(com.sun.jersey.multipart.MultiPart 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()
Method Detail

upload

public javax.ws.rs.core.Response upload(com.sun.jersey.multipart.MultiPart 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 © 2011 DuraSpace. All Rights Reserved.