0

当我在门户中手动创建附加 blob 并尝试以下操作时:

const blockBlobClient = containerClient.getAppendBlobClient('appendtest.csv');
const uploadBlobResponse = await blockBlobClient.appendBlock('test,','test,'.length);

奇迹般有效。

但如果我尝试:

const blockBlobClient = containerClient.uploadBlockBlob('appendtest2.csv','test,','test,'.length, {"x-ms-blob-type":"AppendBlob"});
const uploadBlobResponse = await blockBlobClient.appendBlock('test,','test,'.length);

我收到 blob 不属于受支持类型的错误。

4

1 回答 1

0

在挖掘类型定义之后,这解决了这个问题:

const blockBlobClient = await containerClient.getAppendBlobClient('appendtest5.csv');
const createresponse = await blockBlobClient.create();
const uploadBlobResponse = await blockBlobClient.appendBlock('test,','test,'.length);
于 2020-02-06T19:51:54.887 回答