Data.Cloud.AzureAPI.TAzureBlobService.PutBlock
Delphi
function PutBlock(ContainerName, BlobName: string; const BlockId: string; Content: TArray<Byte>; const ContentMD5: string = ''; const LeaseId: string = ''; ResponseInfo: TCloudResponseInfo = nil): Boolean;
C++
bool __fastcall PutBlock(System::UnicodeString ContainerName, System::UnicodeString BlobName, const System::UnicodeString BlockId, System::DynamicArray<System::Byte> Content, const System::UnicodeString ContentMD5 = System::UnicodeString(), const System::UnicodeString LeaseId = System::UnicodeString(), Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0));
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Data.Cloud.AzureAPI.pas Data.Cloud.AzureAPI.hpp |
Data.Cloud.AzureAPI | TAzureBlobService |
Description
Creates a new block to be committed as part of a blob.
PutBlock creates a new block to be committed as part of a blob.
A block may be up to 4 MB in size. BlockId
must be a base 64-encoded string, which is less than or equal to 64 bytes in size before it is encoded.
For a given blob, all block IDs must be the same length. After you have uploaded a set of blocks, you can create or update the blob on the server from this set by calling PutBlockList. Until then, the blob does not contain this block as part of its content. If you call PutBlock on a blob that does not yet exist, a new uncommitted block blob is created with a content length of 0.
If you call PutBlock using a BlockId
of an existing uncommitted block, the content will be replaced.
If PutBlockList is not called within a week, all uncommitted blocks will be deleted. After calling PutBlockList, any uncommitted blocks not included in the list will be deleted.
The following table describes the parameters:
Parameter | Description |
---|---|
|
The name of the container the blob is in. |
|
The name of the blob to upload the block for. |
|
The ID that uniquely identifies the block. |
|
The block's content in bytes. |
|
An optional MD5 hash of the content, for verification purposes. |
|
The lease ID, required if the blob is locked. |
|
The optional class for storing response info into. |
The method returns True if the operation is successful, and False otherwise.