Data.Cloud.AzureAPI.TAzureBlobService.PutBlock

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function PutBlock(ContainerName, BlobName: string; const BlockId: string; Content: TArray<Byte>;  const ContentMD5: string = ''; const LeaseId: string = ''; ResponseInfo: TCloudResponseInfo = nil): Boolean; overload; deprecated 'Use overloaded method instead';
function PutBlock(const AContainerName, ABlobName, ALeaseId, ABlockId: string; AContent: TArray<Byte>;  const AContentMD5: string; const AResponseInfo: TCloudResponseInfo): Boolean; overload;

C++

bool __fastcall PutBlock _DEPRECATED_ATTRIBUTE1("Use overloaded method instead") (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))/* overload */;
bool __fastcall PutBlock(const System::UnicodeString AContainerName, const System::UnicodeString ABlobName, const System::UnicodeString ALeaseId, const System::UnicodeString ABlockId, System::DynamicArray<System::Byte> AContent, const System::UnicodeString AContentMD5, Data::Cloud::Cloudapi::TCloudResponseInfo* const AResponseInfo)/* overload */;

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

ContainerName

The name of the container the blob is in.

BlobName

The name of the blob to upload the block for.

BlockId

The ID that uniquely identifies the block.

Content

The block's content in bytes.

ContentMD5

An optional MD5 hash of the content, for verification purposes.

LeaseId

The lease ID, required if the blob is locked.

ResponseInfo

The optional class for storing response info into.


The method returns True if the operation is successful, and False otherwise.

See Also