IPWorks Cloud 2020 Node.js Edition

Questions / Feedback?

AddBlock Method

Adds a block to the Blocks properties.

Syntax

azureblob.addBlock(id, blockListType, [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 adds a block to the Block* properties. Id specifies the block's Id, and BlockListType specifies where the server should search for this block.

Block Ids must be Base64-encoded when sent to the server. By default, the class will automatically Base64-encode block Ids as they are sent, and Base64-decode them as they are received. This behavior can be configured using the EncodeBlockIds configuration setting.

All block Ids must be less than or equal to 64 bytes in length before being Base64-encoded. Additionally, all blocks Ids within a single block blob must be unique, and of the exact same length after Base64-encoding.

Valid values for BlockListType are:

Value Meaning During PutBlockList Operations
abktCommitted (0) Search for a committed block with the specified Id.
abktUncommitted (1) Search for an uncommitted block with the specified Id.
abktLatest (2) Search for an uncommitted block with the specified Id; and then, if one isn't found, search for a committed block.

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