简体   繁体   English

使用Azure存储Node.JS SDK获取上传进度

[英]Get upload progress using Azure Storage Node.JS SDK

Looking at this , we have some code that looks like 看看这个 ,我们有一些看起来像这样的代码

var azure = require('azure-storage');    
var blobSvc = azure.createBlobService()

blobSvc.createBlockBlobFromLocalFile('mycontainer', 'giantFile', 'giantFile.bak', function(error, result, response){
  if(!error){
    // file uploaded
  }
});

This "work" but we have no idea about the status of each upload until it returns. 这项“工作”有效,但是直到返回之前,我们都不知道每次上传的状态。 We'd like to print the progress of the upload to the console since it's a sequence of very large files that can take several hours. 我们希望将上传进度打印到控制台,因为它是一系列非常大的文件,可能需要几个小时。

I'm afraid i don't think its possible out of the box with the SDK. 恐怕我认为使用SDK可能无法实现。 MSDN Artical Apparently such an API hasn't been implemented yet. MSDN ARTICAL显然,这样的API尚未落实。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM