Interface ResumableUploadApi


@Consumes("application/json") public interface ResumableUploadApi
Provides Resumable Upload support via Rest API
See Also:
  • Method Details

    • initResumableUpload

      @Named("Object:initResumableUpload") @POST @Path("/upload/storage/v1/b/{bucket}/o") ResumableUpload initResumableUpload(@PathParam("bucket") String bucketName, @QueryParam("name") String objectName, @HeaderParam("X-Upload-Content-Type") String contentType, @HeaderParam("X-Upload-Content-Length") String contentLength)
      initiate a Resumable Upload Session
      Parameters:
      bucketName - Name of the bucket in which the object to be stored
      objectName - Name of the object to upload
      contentType - Content type of the uploaded data
      contentLength - ContentLength of the uploaded object (Media part)
      Returns:
      a ResumableUpload
    • initResumableUpload

      @Named("Object:resumableUpload") @POST @Path("/upload/storage/v1/b/{bucket}/o") ResumableUpload initResumableUpload(@PathParam("bucket") String bucketName, @HeaderParam("X-Upload-Content-Type") String contentType, @HeaderParam("X-Upload-Content-Length") Long contentLength, ObjectTemplate metadata)
      initiate a Resumable Upload Session
      Parameters:
      bucketName - Name of the bucket in which the object to be stored
      contentType - Content type of the uploaded data (Media part)
      contentLength - Content length of the uploaded data (Media part)
      metada - Supply an ObjectTemplate
      Returns:
      a ResumableUpload
    • upload

      @Named("Object:resumableUpload") @PUT @Path("/upload/storage/v1/b/{bucket}/o") ResumableUpload upload(@PathParam("bucket") String bucketName, @QueryParam("upload_id") String uploadId, @HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Length") String contentLength, Payload payload)
      Stores a new object
      Parameters:
      bucketName - Name of the bucket in which the object to be stored
      options - Supply InsertObjectOptions with optional query parameters. 'name' is mandatory.
      Returns:
      If successful, this method returns a
      invalid reference
      GoogleCloudStorageObject
      resource.
    • chunkUpload

      @Named("Object:Upload") @PUT @Path("/upload/storage/v1/b/{bucket}/o") ResumableUpload chunkUpload(@PathParam("bucket") String bucketName, @QueryParam("upload_id") String uploadId, @HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Length") Long contentLength, @HeaderParam("Content-Range") String contentRange, Payload payload)
      Facilitate to use resumable upload operation to upload files in chunks
      Parameters:
      bucketName - Name of the bucket in which the object to be stored
      uploadId - uploadId returned from initResumableUpload operation
      contentType - Content type of the uploaded data
      contentLength - Content length of the uploaded data
      contentRange - Range in {bytes StartingByte - Endingbyte/Totalsize } format ex: bytes 0 - 1213/2000
      payload - a Payload with actual data to upload
      Returns:
      a ResumableUpload
    • checkStatus

      @Named("Object:Upload") @PUT @DefaultValue("0") @Path("/upload/storage/v1/b/{bucket}/o") ResumableUpload checkStatus(@PathParam("bucket") String bucketName, @QueryParam("upload_id") String uploadId, @HeaderParam("Content-Range") String contentRange)
      Check the status of a resumable upload
      Parameters:
      bucketName - Name of the bucket in which the object to be stored
      uploadId - uploadId returned from initResumableUpload operation
      contentRange - Range in {bytes StartingByte - Endingbyte/Totalsize } format ex: bytes 0 - 1213/2000
      Returns:
      a ResumableUpload