Azure Set-AzureStorageBlobContent 更改大小块
Azure Set-AzureStorageBlobContent change size block
我想知道如何使用命令 {Set-AzureStorageBlobContent} 上传 blob 大小并将其块大小更改为 100 MB,因为我遇到的问题是我超过了 blob 存储中允许的 50.000 个块。
AFAIK,看来你做不到。 Set-AzureStorageBlobContent
命令本质上默认调用 Put Block
rest api,如果你想将块大小更改为 100 MB
,你需要在 Content-Length
中指定请求 header 到 104857600
字节(即 100MB)。
根据我的测试,如果我们捕捉到 powershell 命令的请求,我们会发现 Content-Length
默认为 4194304
字节。
在Set-AzureStorageBlobContent
的doc中,你会发现一个名为-Properties
的参数,它允许我们传递CacheControl, ContentDisposition, ContentEncoding, ContentLanguage, ContentMD5, ContentType
属性,它们都是请求headers,如果支持Content-Length
,我想应该会有吧
此外,如果你想改进它,你可以 post 你的想法 azure feedback。
我想知道如何使用命令 {Set-AzureStorageBlobContent} 上传 blob 大小并将其块大小更改为 100 MB,因为我遇到的问题是我超过了 blob 存储中允许的 50.000 个块。
AFAIK,看来你做不到。 Set-AzureStorageBlobContent
命令本质上默认调用 Put Block
rest api,如果你想将块大小更改为 100 MB
,你需要在 Content-Length
中指定请求 header 到 104857600
字节(即 100MB)。
根据我的测试,如果我们捕捉到 powershell 命令的请求,我们会发现 Content-Length
默认为 4194304
字节。
在Set-AzureStorageBlobContent
的doc中,你会发现一个名为-Properties
的参数,它允许我们传递CacheControl, ContentDisposition, ContentEncoding, ContentLanguage, ContentMD5, ContentType
属性,它们都是请求headers,如果支持Content-Length
,我想应该会有吧
此外,如果你想改进它,你可以 post 你的想法 azure feedback。