【发布时间】:2016-12-22 14:30:04
【问题描述】:
我正在尝试使用 azure-storage 上传流,但方法 CreateBlockBlobFromStream 需要流长度。我不知道在哪里得到长度。
我的代码
const Readable = require('stream').Readable;
const rs = Readable();
rs._read = () => {
//here I read a file, loop through the lines and then generate some xml
};
const blobSvc = azure.createBlobService(storageName, key);
blobSvc.createBlockBlobFromStream ('data','test.xml', rs, ???, (err, r, resp) => {});
【问题讨论】:
-
你有什么更新吗?
-
今天或明天试试这个。我一直在度假:-)