Udostępnij za pośrednictwem


BlockBlobClient.StageBlock Method

Definition

The StageBlock(String, Stream, BlockBlobStageBlockOptions, CancellationToken) operation creates a new block as part of a block blob's "staging area" to be eventually committed via the CommitBlockListAsync(IEnumerable<String>, CommitBlockListOptions, CancellationToken) operation.

For more information, see Put Block.

public virtual Azure.Response<Azure.Storage.Blobs.Models.BlockInfo> StageBlock (string base64BlockId, System.IO.Stream content, Azure.Storage.Blobs.Models.BlockBlobStageBlockOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member StageBlock : string * System.IO.Stream * Azure.Storage.Blobs.Models.BlockBlobStageBlockOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlockInfo>
override this.StageBlock : string * System.IO.Stream * Azure.Storage.Blobs.Models.BlockBlobStageBlockOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlockInfo>
Public Overridable Function StageBlock (base64BlockId As String, content As Stream, Optional options As BlockBlobStageBlockOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of BlockInfo)

Parameters

base64BlockId
String

A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size.

For a given blob, the length of the value specified for the blockid parameter must be the same size for each block. Note that the Base64 string will be URL-encoded.

content
Stream

A Stream containing the content to upload.

options
BlockBlobStageBlockOptions

Optional parameters.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

A Response<T> describing the state of the updated block.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to