Skip to content
Merged
2 changes: 1 addition & 1 deletion sdk/storage/azure_storage_blob/assets.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "rust",
"Tag": "rust/azure_storage_blob_cb9b90a35f",
"Tag": "rust/azure_storage_blob_39899fca75",
"TagPrefix": "rust/azure_storage_blob"
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl AppendBlobClient {
/// # Arguments
///
/// * `content_length` - Total length of the blob data to be uploaded.
/// * `options` - Optional configuration for the request. See [`AppendBlobClientCreateOptionsExt`](crate::models::AppendBlobClientCreateOptionsExt) for additional usage helpers.
/// * `options` - Optional configuration for the request.
pub async fn create(
&self,
options: Option<AppendBlobClientCreateOptions<'_>>,
Expand Down
5 changes: 2 additions & 3 deletions sdk/storage/azure_storage_blob/src/clients/blob_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,8 @@ impl BlobClient {
options.if_none_match = Some(String::from("*"));
}

let block_blob_client = self.client.get_block_blob_client();

block_blob_client
self.client
.get_block_blob_client()
.upload(data, content_length, Some(options))
.await
}
Expand Down
25 changes: 22 additions & 3 deletions sdk/storage/azure_storage_blob/src/clients/block_blob_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ use crate::{
generated::models::{
BlobClientDownloadResult, BlobClientGetPropertiesResult,
BlockBlobClientCommitBlockListResult, BlockBlobClientStageBlockResult,
BlockBlobClientUploadResult,
BlockBlobClientUploadBlobFromUrlResult, BlockBlobClientUploadResult,
},
models::{
BlobClientDeleteOptions, BlobClientDownloadOptions, BlobClientGetPropertiesOptions,
BlobClientSetMetadataOptions, BlobClientSetPropertiesOptions, BlobClientSetTierOptions,
BlockBlobClientCommitBlockListOptions, BlockBlobClientGetBlockListOptions,
BlockBlobClientStageBlockOptions, BlockBlobClientUploadOptions, BlockList, BlockListType,
BlockLookupList,
BlockBlobClientStageBlockOptions, BlockBlobClientUploadBlobFromUrlOptions,
BlockBlobClientUploadOptions, BlockList, BlockListType, BlockLookupList,
},
pipeline::StorageHeadersPolicy,
BlobClientOptions, BlockBlobClientOptions,
Expand Down Expand Up @@ -135,4 +135,23 @@ impl BlockBlobClient {
) -> Result<Response<BlockList, XmlFormat>> {
self.client.get_block_list(list_type, options).await
}

/// Creates a new Block Blob where the content of the blob is read from a given URL. The default behavior is content of an existing blob is overwritten with the new blob.
///
/// # Arguments
///
/// * `copy_source` - A URL of up to 2 KB in length that specifies a file or blob. The value should be URL-encoded as it would appear in a request URI.
/// The source must either be public or must be authenticated via a shared access signature as part of the url or using the source_authorization keyword.
/// If the source is public, no authentication is required. Examples:
/// - `https://myaccount.blob.core.windows.net/mycontainer/myblob`
/// - `https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>`
/// - `https://otheraccount.blob.core.windows.net/mycontainer/myblob?sastoken`
/// * `options` - Optional configuration for the request.
pub async fn upload_blob_from_url(
&self,
copy_source: String,
options: Option<BlockBlobClientUploadBlobFromUrlOptions<'_>>,
) -> Result<Response<BlockBlobClientUploadBlobFromUrlResult, NoFormat>> {
self.client.upload_blob_from_url(copy_source, options).await
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl PageBlobClient {
///
/// * `content_length` - The maximum size for the Page blob, up to 1TB. The page blob size must
/// be aligned to a 512-byte boundary.
/// * `options` - Optional configuration for the request. See [`PageBlobClientCreateOptionsExt`](crate::models::PageBlobClientCreateOptionsExt) for additional usage helpers.
/// * `options` - Optional configuration for the request.
pub async fn create(
&self,
content_length: u64,
Expand Down

Large diffs are not rendered by default.

134 changes: 64 additions & 70 deletions sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading