我将文件上传到Azure中的blob存储,现在我想获取上传的Azure链接。我正在使用node.js,下面是我的代码:
blobService.createContainerIfNotExists('trimfaces', {
publicAccessLevel: 'blob'
}, function(error, result, response) {
if (!error) {
// if result = true, container was created.
// if result = false, container already existed.
}
});
答案 0 :(得分:1)
您可能想要致电blobService.getUrl(containerName, blobName)
。 API文档位于:http://azure.github.io/azure-storage-node/BlobService.html#getUrl
答案 1 :(得分:0)
根据文档,这是使用节点列出blob的方法:
blobSvc.listBlobsSegmented('mycontainer', null, function(error, result, response){
if(!error){
// result.entries contains the entries
// If not all blobs were returned, result.continuationToken has the continuation token.
}
});
您可以在此处查看Azure存储Blob的完整文档: https://azure.microsoft.com/en-us/documentation/articles/storage-nodejs-how-to-use-blob-storage/