William Tio Wee Leong
William Tio Wee Leong

Reputation: 473

How to display all the image from Azure Blob Storage in table using ASP.NET MVC3?

As stated in the title. How to display all the image from Azure Blob Storage in table using ASP.NET MVC3?

Upvotes: 1

Views: 6906

Answers (2)

Parv Sharma
Parv Sharma

Reputation: 12705

a quick and dirty method can be

var accnt = CloudStorageAccount.parse("");//ur accnt string
var client = accnt.CreateCloudBlobClient();
var blobs = client.GetContainerRefrence(""/*container name*/).ListBlobs();
var urls = new List<string>();
foreach(var blob in blobs)
{
string url = "base host"+blob.uri.AbsoluteUri;
urls.Add(url);
}
//now display it the way you want

Upvotes: 1

Darin Dimitrov
Darin Dimitrov

Reputation: 1039588

You may take a look at the documentation which explains in great details how to achieve different operations with Azure Blob Storage. More specifically checkout the How to List the Blobs in a Container and How to Download Blobs sections.

Upvotes: 2

Related Questions