1

如标题所述。如何使用 ASP.NET MVC3 在表中显示 Azure Blob 存储中的所有图像?

4

2 回答 2

2

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.

于 2012-05-22T07:36:28.943 回答
1

一种快速而肮脏的方法可以是

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
于 2012-05-22T07:40:09.083 回答