当我尝试使用 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/