class AzureBlob::Client
def commit_blob_blocks(key, block_ids, options = {})
This is the checksum for the whole blob. The checksum is saved on the blob, but it is not validated!
[+:content_md5+]
Options:
Takes a key (path) and an array of block ids
Calls to {Put Block List}[https://learn.microsoft.com/en-us/rest/api/storageservices/put-block-list]
Commits the list of blocks to a blob.
def commit_blob_blocks(key, block_ids, options = {}) block_list = BlockList.new(block_ids) content = block_list.to_s uri = generate_uri("#{container}/#{key}") uri.query = URI.encode_www_form(comp: "blocklist") headers = { "Content-Length": content.size, "Content-Type": options[:content_type], "x-ms-blob-content-md5": options[:content_md5], "x-ms-blob-content-disposition": options[:content_disposition], } Http.new(uri, headers, signer:, **options.slice(:metadata, :tags)).put(content) end