【问题标题】:How to get blob to a string in Node,js with azure如何使用 azure 将 blob 获取到 Node、js 中的字符串
【发布时间】:2014-04-19 19:09:15
【问题描述】:

我正在尝试从 Windows azure blob 存储中直接下载 blob 到字符串。目前我可以把它放到一个文件中。但是找不到任何有关如何将数据直接传递给变量的文档。

blobService.getBlobToStream('ratings'
        , '0001'
        , fs.createWriteStream('output.txt')
        , function(error){
        if(!error){
            // Wrote blob to stream
            console.log("blob written");
        }
    });

有什么想法吗?

【问题讨论】:

    标签: node.js azure


    【解决方案1】:

    node.js SDK 中有一个名为getBlobToText 的函数(源代码:https://github.com/Azure/azure-sdk-for-node/blob/master/lib/services/blob/blobservice.js)。试试看吧。

    【讨论】:

      猜你喜欢
      • 2019-05-31
      • 2021-02-09
      • 2017-10-24
      • 1970-01-01
      • 2021-11-06
      • 1970-01-01
      • 2020-06-17
      • 2013-08-15
      • 2021-03-24
      相关资源
      最近更新 更多