node.js - 尝试通过 Node createBlockBlobFromStream() 将 Blob 上传到 Azure 存储时出现“RequestBodyTooLarge”

标签 node.js azure azure-storage

当我尝试使用 Azure Node sdk 中的 createBlockBlobFromStream() 将 100MB 文件上传到 Azure Blob 存储时,收到以下错误:

error: { code: 'RequestBodyTooLarge',
  message: 'The request body is too large and exceeds the maximum permissible limit.
  maxlimit: '67108864' }

有什么想法吗?最大 blob 大小似乎为 200GB,或 50.000 个 block 。我检查了常量, block 大小设置为最大 4MB。 SDK 错误,或者我遗漏了什么?

最佳答案

以下是documented :

If you attempt to upload a block blob that is larger than 64 MB, or a page blob larger than 1 TB, the service returns status code 413 (Request Entity Too Large). The Blob service also returns additional information about the error in the response, including the maximum blob size permitted in bytes.

您可能需要检查 createBlockBlobFromStream() 以验证它是否使用小于 4MB 的 block 来上传大于 64MB 的文件。例如,您可以使用 Fiddler 来验证实际的 REST 操作,并且应该很快显示 createBlockBlobFromStream() 尝试执行的操作。

关于node.js - 尝试通过 Node createBlockBlobFromStream() 将 Blob 上传到 Azure 存储时出现“RequestBodyTooLarge”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11727146/

相关文章:

node.js - 如何获取有关 Google Analytics 请求的用户特定数据?

azure - 访问在特定端口上的 Azure Windows 计算机上运行的服务

Azure Pipeline如何从jenkins服务器触发构建并将文件从自托管Linux代理复制到托管代理并在托管代理上构建

azure - key 重新生成后,管理存储帐户 key 的 KeyVault 是否会使已提供的 SAS token 失效?

azure - WebJob 触发器的 Blob 路径名称提供程序

node.js - Node.js 中如何处理 'read ETIMEDOUT'?

javascript - json.parse 意外的 token 错误

node.js - 坚持进行简单的网络聊天

azure - Luis.ai 迁移错误 "Endpoint keys were assigned by collaborators to your apps and you have no access to them."

c# - 通过 Windows 窗体 c# 将文件上传到 Blob