Interface ResumableUploadApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResumableUpload
checkStatus(String bucketName, String uploadId, String contentRange)
Check the status of a resumable uploadResumableUpload
chunkUpload(String bucketName, String uploadId, String contentType, Long contentLength, String contentRange, Payload payload)
Facilitate to use resumable upload operation to upload files in chunksResumableUpload
initResumableUpload(String bucketName, String contentType, Long contentLength, ObjectTemplate metadata)
initiate a Resumable Upload SessionResumableUpload
initResumableUpload(String bucketName, String objectName, String contentType, String contentLength)
initiate a Resumable Upload SessionResumableUpload
upload(String bucketName, String uploadId, String contentType, String contentLength, Payload payload)
Stores a new object
-
-
-
Method Detail
-
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 storedobjectName
- Name of the object to uploadcontentType
- Content type of the uploaded datacontentLength
- 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 storedcontentType
- Content type of the uploaded data (Media part)contentLength
- Content length of the uploaded data (Media part)metada
- Supply anObjectTemplate
- 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 storedoptions
- SupplyInsertObjectOptions
with optional query parameters. 'name' is mandatory.- Returns:
- If successful, this method returns a
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 storeduploadId
- uploadId returned from initResumableUpload operationcontentType
- Content type of the uploaded datacontentLength
- Content length of the uploaded datacontentRange
- Range in {bytes StartingByte - Endingbyte/Totalsize } format ex: bytes 0 - 1213/2000payload
- aPayload
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 storeduploadId
- uploadId returned from initResumableUpload operationcontentRange
- Range in {bytes StartingByte - Endingbyte/Totalsize } format ex: bytes 0 - 1213/2000- Returns:
- a
ResumableUpload
-
-