Show: Delphi C++
Display Preferences


From RAD Studio API Documentation
Jump to: navigation, search


function PutBlockBlob(ContainerName, BlobName: string; Content: TArray<Byte>;  LeaseId: string = ''; OptionalHeaders: TStrings = nil; Metadata: TStrings = nil; ResponseInfo: TCloudResponseInfo = nil): Boolean;


bool __fastcall PutBlockBlob(System::UnicodeString ContainerName, System::UnicodeString BlobName, System::DynamicArray<System::Byte> Content, System::UnicodeString LeaseId = System::UnicodeString(), System::Classes::TStrings* OptionalHeaders = (System::Classes::TStrings*)(0x0), System::Classes::TStrings* Metadata = (System::Classes::TStrings*)(0x0), Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0));


Type Visibility Source Unit Parent
function public
Data.Cloud.AzureAPI TAzureBlobService


Creates a new block blob or updates an existing one in the given container.

PutBlockBlob is used to create or replace an existing block blob in the given container.

The following table describes the parameters:

Parameter Description


The name of the blob's container.


The name of the blob.


The content to set into the blob.


The optional lease ID.


The optional headers.


The metadata to set onto the blob.


The optional class for storing response info into.

If a block blob with the given name (in the specified container) already exists, then its content will be replaced with the data from this call.

Note that LeaseId should be set as an empty string, except when a blob with the given name already exists and is currently locked.

The OptionalHeaders can be set onto the request. Such optional headers are:

  • Content-Type (or x-ms-blob-content-type)
  • Content-Encoding (or x-ms-blob-content-encoding)
  • Content-Language (or x-ms-blob-content-language)
  • Content-MD5 (or x-ms-blob-content-md5)
  • Cache-Control (or x-ms-blob-cache-control)
  • If-Modified-Since
  • If-Unmodified-Since
  • If-Match (Compares the resource's entity tag (Etag) value to the value of this header)
  • If-None-Match (Compares the resource's Etag value to the value of this header)

The optional metadata names should start with 'x-ms-meta-'. If they do not, this prefix will be added.

The maximum allowed Content-Length of a block blob is 64 MB. If it is larger than that, then you need to upload it as blocks.

The method returns True if the creation/replacement was successful, and False otherwise.

See Also

Personal tools
In Other Languages
Previous Versions