[英]How to create an Azure AppendBlob from node.js
I have installed the npm azure-storage package. 我已经安装了npm azure-storage软件包。
On Azure I have created a Storage Account and a container. 在Azure上,我创建了一个存储帐户和一个容器。
I then try to create an Append Blob: 然后,我尝试创建一个Append Blob:
const azure = require('azure-storage');
const service = azure.createBlobService("[ACCOUNT]", "[KEY]");
service.createAppendBlobFromText("[CONTAINER]",
"some-blob-name",
"some-text",
{},
(err, result) => {
console.log('err ->',err);
console.log('result ->',result);
});
The result of calling this is: 调用它的结果是:
err -> { Error
at Function.StorageServiceClient._normalizeError (/[REMOVED]/node_modules/azure-storage/lib/common/services/storageserviceclient.js:1191:23)
at BlobService.StorageServiceClient._processResponse (/[REMOVED]/node_modules/azure-storage/lib/common/services/storageserviceclient.js:738:50)
at Request.processResponseCallback [as _callback] (/[REMOVED]/node_modules/azure-storage/lib/common/services/storageserviceclient.js:311:37)
at Request.self.callback (/[REMOVED]/node_modules/request/request.js:186:22)
at emitTwo (events.js:125:13)
at Request.emit (events.js:213:7)
at Request.<anonymous> (/[REMOVED]/node_modules/request/request.js:1163:10)
at emitOne (events.js:115:13)
at Request.emit (events.js:210:7)
at IncomingMessage.<anonymous> (/[REMOVED]/node_modules/request/request.js:1085:12)
at Object.onceWrapper (events.js:314:30)
at emitNone (events.js:110:20)
at IncomingMessage.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1045:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
name: 'StorageError',
message: 'Append blobs are not supported.\nRequestId:ed1777f4-601c-00cf-19a0-bb77ba000000\nTime:2018-03-14T14:25:50.8138962Z',
code: 'BlobTypeNotSupported',
statusCode: 400,
requestId: 'ed1777f4-601c-00cf-19a0-bb77ba000000' }
result -> null
I have not been able to find anything, when searching for the error. 搜索错误时,我一直找不到任何东西。
Am I missing something here? 我在这里想念什么吗?
Please check the redundancy kind of the storage account in which you're trying to create this blob. 请检查您要在其中创建此Blob的存储帐户的冗余类型。
Blob type support varies by the storage account redundancy kind. Blob类型支持因存储帐户冗余类型而异。
For example, ZRS Classic
redundancy kind of storage account only supports Block Blob
while Premium LRS
redundancy kind of storage account only supports Page Blob
. 例如,
ZRS Classic
冗余类型的存储帐户仅支持Block Blob
而Premium LRS
冗余类型的存储帐户仅支持Page Blob
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.