3

"images" という名前の Azure コンテナーがありますが、このコンテナー内に格納されているすべての BLOB を取得する方法がわかりません。

4

1 に答える 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 に答える