将新块上传到现有 Azure BlockBlob 时块 ID 的最大长度是多少

What is the maximum length for block Id when uploading new block to existing Azure BlockBlob

在处理 Azure Blob 存储时,每个 blob 数据都有元数据,无法将元数据添加到每个块。

在我们的例子中,有一些数据我们希望将其与实际块内容分开,但在创建时仍附加到每个块,这样虽然整个 blob 内容都是其原始格式,但从元每个块的数据,我们可以跟踪每个传输的历史以进一步遥测。

由于在调用Microsoft.WindowsAzure.Storage.Blob.PutBlockAsync时没有可用的元数据属性,我们想到的解决方法是使用元数据的Json表示作为块ID。

一个问题是,我们不知道块 ID 的最大允许长度。我的问题是,块 ID 的长度是否有已知限制?

请指教

One concern is that, we don't know the maximum allowed length of the block id. my question is, is there a known limit of the length of the block id?

块id的最大长度可以是64字节。请注意,块 ID 必须是 bas64 编码。

从这个link:

A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size.

For a given blob, the length of the value specified for the blockid parameter must be the same size for each block.

Note that the Base64 string must be URL-encoded.