[英]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?
如何使用ASP.NET MVC3在表中显示Azure Blob存储的所有图像?
You may take a look at the documentation which explains in great details how to achieve different operations with Azure Blob Storage. 您可以查看文档 ,其中详细说明了如何使用Azure Blob存储实现不同的操作。 More specifically checkout the How to List the Blobs in a Container and How to Download Blobs sections.
更具体地说,请查看如何列出容器中的Blob以及如何下载Blob部分。
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.