Google Cloud Storage v1 API - Class SignedUrlResumableUpload (4.7.0)

public sealed class SignedUrlResumableUpload : ResumableUpload

Reference documentation and code samples for the Google Cloud Storage v1 API class SignedUrlResumableUpload.

Class which can perform a resumable upload using a signed URL to initiate the session.

Inheritance

object > ResumableUpload > SignedUrlResumableUpload

Namespace

Google.Cloud.Storage.V1

Assembly

Google.Cloud.Storage.V1.dll

Methods

Create(string, Stream, ResumableUploadOptions)

public static SignedUrlResumableUpload Create(string signedUrl, Stream contentStream, ResumableUploadOptions options = null)

Creates a SignedUrlResumableUpload instance.

Parameters
NameDescription
signedUrlstring

The signed URL which can be used to initiate a resumable upload session. See UrlSigner.ResumableHttpMethod for more information.

contentStreamStream

The data to be uploaded.

optionsResumableUploadOptions

The options for the upload operation.

Returns
TypeDescription
SignedUrlResumableUpload

The instance which can be used to upload the specified content.

InitiateSession(string, ResumableUploadOptions)

public static Uri InitiateSession(string signedUrl, ResumableUploadOptions options = null)

Initiates the resumable upload session by posting to the signed URL and returns the session URI.

Parameters
NameDescription
signedUrlstring

The signed URL which can be used to initiate a resumable upload session. See UrlSigner.ResumableHttpMethod for more information.

optionsResumableUploadOptions

The options for the upload operation.

Returns
TypeDescription
Uri

The session URI to use for the resumable upload.

InitiateSessionAsync(string, ResumableUploadOptions, CancellationToken)

public static Task<Uri> InitiateSessionAsync(string signedUrl, ResumableUploadOptions options = null, CancellationToken cancellationToken = default)

Initiates the resumable upload session by posting to the signed URL and returns the session URI.

Parameters
NameDescription
signedUrlstring

The signed URL which can be used to initiate a resumable upload session. See UrlSigner.ResumableHttpMethod for more information.

optionsResumableUploadOptions

The options for the upload operation.

cancellationTokenCancellationToken

The token to monitor for cancellation requests.

Returns
TypeDescription
TaskUri

A task containing the session URI to use for the resumable upload.

InitiateSessionAsync(CancellationToken)

public override Task<Uri> InitiateSessionAsync(CancellationToken cancellationToken)

Initiates the resumable upload session and returns the session URI, or upload URI. See https://developers.google.com/drive/manage-uploads#start-resumable and https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload#start-resumable for more information.

Parameter
NameDescription
cancellationTokenCancellationToken

The token to monitor for cancellation requests.

Returns
TypeDescription
TaskUri

The task containing the session URI to use for the resumable upload.

Overrides

See Also