BlockBlobURL.upload(Flowable<ByteBuffer> data, long length, BlobHTTPHeaders headers, Metadata metadata, BlobAccessConditions accessConditions, Context context) Method

Definition

Creates a new block blob, or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with PutBlob; the content of the existing blob is overwritten with the new content. To perform a partial update of a block blob's, use PutBlock and PutBlockList. For more information, see the Azure Docs.

Note that the data passed must be replayable if retries are enabled (the default). In other words, the Flowable 

</code> must produce the same data each time it is subscribed to.</p>

For more efficient bulk-upload scenarios, please refer to the TransferManager for convenience methods.

public Single<BlockBlobUploadResponse> upload(Flowable<ByteBuffer> data, long length, BlobHTTPHeaders headers, Metadata metadata, BlobAccessConditions accessConditions, Context context)

Parameters

data
Flowable<ByteBuffer>

The data to write to the blob. Note that thisFlowable 

</code> must be replayable if retries are enabled (the default). In other words, the Flowable must produce the same data each time it is subscribed to. </p>
length
long

The exact length of the data. It is important that this value match precisely the length of the data emitted by theFlowable 

</code> . </p>
headers
BlobHTTPHeaders

BlobHTTPHeaders

metadata
Metadata

Metadata

context
Context

Context 

</code> offers a means of passing arbitrary data (key/value pairs) to an <xref uid="" data-throw-if-not-resolved="false">com.microsoft.rest.v2.http.HttpPipeline</xref>'s policy objects. Most applications do not need to pass arbitrary data to the pipeline and can pass<code>Context.NONE 

</code> or<code>null 

</code> . Each context object is immutable. The<code>withContext 

</code> with data method creates a new<code>Context 

</code> object that refers to its parent, forming a linked list. </p>

Returns

Emits the successful response.

Remarks

Sample Code

Warning

It looks like the sample you are looking for has moved! Rest assured we are working on resolving this.

For more samples, please see the Samples file

Applies to