TransferManager.uploadFileToBlockBlob(final AsynchronousFileChannel file, final BlockBlobURL blockBlobURL, final int blockLength, final TransferManagerUploadToBlockBlobOptions options) Method

Definition

Uploads the contents of a file to a block blob in parallel, breaking it into block-size chunks if necessary.

public static Single<CommonRestResponse> uploadFileToBlockBlob(final AsynchronousFileChannel file, final BlockBlobURL blockBlobURL, final int blockLength, final TransferManagerUploadToBlockBlobOptions options)

Parameters

file
final AsynchronousFileChannel

The file to upload.

blockBlobURL
final BlockBlobURL

Points to the blob to which the data should be uploaded.

blockLength
final int

If the data must be broken up into blocks, this value determines what size those blocks will be. This will affect the total number of service requests made as each REST request uploads exactly one block in full. This value will be ignored if the data can be uploaded in a single put-blob operation. Must be between 1 and BlockBlobURL#MAX_STAGE_BLOCK_BYTES. Note as well that fileLength/blockLength 

</code> must be less than or equal to <xref uid="com.microsoft.azure.storage.blob._block_blob_u_r_l.MAX_BLOCKS" data-throw-if-not-resolved="false">BlockBlobURL#MAX_BLOCKS</xref>. </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