IPWorks Cloud 2020 Node.js Edition

Questions / Feedback?

PutBlockList Method

Commits a list of data blocks to a block blob.

Syntax

azureblob.putBlockList(blockBlob, blockList, [callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This method commits the blocks of data specified by the Block* properties to the specified BlockBlob in the container currently selected by Container. Up to 50000 blocks may be committed to a single block blob at any time.

The BlockList parameter can optionally be passed a non-empty list of blocks to commit in order to repopulate the Block* properties before building the request. This allows applications to build an entire block list and then commit it in a single call, rather than manipulating the Block* properties directly, or calling AddBlock.

The value supplied should contain a comma-separated list of strings like {BlockListType}:{BlockId}, where {BlockListType} is either C, U, or L to specify whether the server should search for a block with the associated Id in BlockBlob's committed block list, uncommitted block list, or both (uncommitted; then committed, if necessary). If necessary, the BlockListStringSeparator configuration setting can be used to change the separator string used when parsing the value.

If BlockList is empty, the current items in the Block* properties will remain unchanged.

If the specified blob has an active lease, its lease Id must be specified using LeaseId, or the request will fail.

Note: By default, the class will automatically retrieve and re-submit the BlockBlob's current properties and metadata (if it exists) when this method is called, since Azure would clear them otherwise.

However, if one or more x-ms-blob-* headers are present in OtherHeaders when this method is called, the class will send them rather than re-submitting any of the retrieved blob properties. Similarly, if the SendMetadataOnPutBlockList configuration setting is enabled, the class will send the metadata items currently present in the Metadata* properties instead of those retrieved from the server.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 Node.js Edition - Version 20.0 [Build 8265]