我有一个名为“images”的天蓝色容器,但我不知道如何获取存储在这个容器中的所有 blob
问问题
691 次
1 回答
4
我找到了答案:
// We get reference for the container (by name "containerName" variable)
container = blobClient.GetContainerReference(containerName);
// We create the container if this container is not exists
container.CreateIfNotExist();
// Set permissions
var permissions = new BlobContainerPermissions
{
PublicAccess = blobContainerPublicAccessType.Blob
};
container.SetPermissions(permissions);
// Get list of all blobs URLs which are stored inside container
IEnumerable<IListBlobItem> blobs = container.ListBlobs();
return blobs.Select(item => item.Uri.ToString()).ToList();
于 2013-03-31T19:53:46.983 回答