2

I uploaded a file to my blob storage in Azure and now I want to get the Azure link for the upload. I'm using node.js and below is my code:

blobService.createContainerIfNotExists('trimfaces', {
  publicAccessLevel: 'blob'
}, function(error, result, response) {
  if (!error) {
    // if result = true, container was created.
    // if result = false, container already existed.
  }
});
2
  • The link is like this http://<storage-account-name>.blob.core.windows.net/<container-name>/<blob-name> Commented Mar 11, 2016 at 3:43
  • Your code isn't showing how you uploaded your blob. Did you write code to do so, or are you talking about manually uploading blobs and then finding them programmatically? Commented Mar 11, 2016 at 5:03

2 Answers 2

3

You might want to call blobService.getUrl(containerName, blobName). The API document is here: http://azure.github.io/azure-storage-node/BlobService.html#getUrl

[Updated]

The versioned document for v10 or later is at: https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-storage-blob/12.0.0/classes/blockblobclient.html#url

Sign up to request clarification or add additional context in comments.

Comments

0

According to the documentation, this is the way to list blobs using node:

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.
  }
});

You can see the entire documentation for Azure Storage Blobs here: https://azure.microsoft.com/en-us/documentation/articles/storage-nodejs-how-to-use-blob-storage/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.