3
我有一個名爲「圖像」蔚藍的容器,但我無法弄清楚如何獲得存儲在此容器內的所有斑點如何獲得所有斑點與存儲Azure存儲容器內
我有一個名爲「圖像」蔚藍的容器,但我無法弄清楚如何獲得存儲在此容器內的所有斑點如何獲得所有斑點與存儲Azure存儲容器內
我已經找到了回答:
// 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();
我回答了我的自我。希望它會對某人有所幫助。如果有幫助,請投票;) – Sergey