class AzureBlob::Client
def put_blob_block(key, index, content, options = {})
[+:content_md5+]
Options:
Returns the id of the block. Required to commit the list of blocks to a blob.
Calls to {Put Block}[https://learn.microsoft.com/en-us/rest/api/storageservices/put-block]
Uploads a block to a blob.
def put_blob_block(key, index, content, options = {}) block_id = generate_block_id(index) uri = generate_uri("#{container}/#{key}") uri.query = URI.encode_www_form(comp: "block", blockid: block_id) headers = { "Content-Length": content.size, "Content-Type": options[:content_type], "Content-MD5": options[:content_md5], } Http.new(uri, headers, signer:).put(content) block_id end