我正在尝试从windows azure blob存储中下载一个blob,直接到字符串。目前我可以把它拿到一个文件。但无法找到有关如何将数据直接转换为变量的任何文档。
blobService.getBlobToStream('ratings'
, '0001'
, fs.createWriteStream('output.txt')
, function(error){
if(!error){
// Wrote blob to stream
console.log("blob written");
}
});
任何想法?
答案 0 :(得分:0)
在node.js SDK中有一个名为getBlobToText
的函数(源代码在这里:https://github.com/Azure/azure-sdk-for-node/blob/master/lib/services/blob/blobservice.js)。试一试。