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