gpt4 book ai didi

c# - 将 block blob 上传到 Azure 时为 "The request body is too large and exceeds the maximum permissible limit"

转载 作者:行者123 更新时间:2023-11-30 21:40:51 27 4
gpt4 key购买 nike

我正在尝试将 300GB 文件上传到 Azure Blob 存储。下面是我正在使用的代码:

// content = array of bytes ~ 300 GB
using (var stream = new MemoryStream(content))
{
var blobRequestOptions = new BlobRequestOptions
{
ParallelOperationThreadCount = Microsoft.WindowsAzure.Storage.Shared.Protocol.Constants.MaxParallelOperationThreadCount
};
blob.UploadFromStream(stream, options: blobRequestOptions);
}

此操作失败并出现以下消息错误:

The request body is too large and exceeds the maximum permissible limit

最佳答案

我认为问题(根据评论确认较旧的 SDK 版本)是客户端 SDK 版本号。从 v8.0 开始,支持大 (200GB -> 4.77TB) block blob 大小( block 现在高达 100MB,而旧的 4MB 限制)。 50,000 block 限制仍然适用(因此,100MB x 50,000 block 提供 4.77TB 大小)。

之前的 SDK 版本仅限于 4MB block 和 200GB block blob 大小。

Larger Block Blobs are supported by the most recent releases of the .NET Client Library (version 8.0.0), the Java Client Library (version 5.0.0), the Node.js Client Library (version 2.0.0) and the AzCopy Command-Line Utility (version 5.2.0). You can also directly use the REST API as always. Larger Block Blobs are supported by REST API version 2016-05-31 and later.

更多信息here .

关于c# - 将 block blob 上传到 Azure 时为 "The request body is too large and exceeds the maximum permissible limit",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44128442/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com