私のアプリケーションでは、WindowsAzureのBLOBストレージにいくつかの画像をアップロードできます。次に、アプリケーションの2番目の部分を開発し、Azureサーバーから画像を取得して、画像ボックスに表示します。
私はいくつかのことを試しました:
listboxPictures.Items.Clear();
iTotalPictures = 0;
CloudBlobClient blobClient =
new CloudBlobClient("http://ferryjongmans.blob.core.windows.net/",
new StorageCredentialsSharedAccessSignature(signature));
CloudBlobContainer container = blobClient.GetContainerReference(comboBox1.SelectedItem.ToString());
CloudBlobDirectory direct = container.GetDirectoryReference(comboBox1.SelectedItem.ToString());
BlobRequestOptions options = new BlobRequestOptions();
options.UseFlatBlobListing = true;
options.BlobListingDetails = BlobListingDetails.Snapshots;
foreach (var blobItem in direct.ListBlobs(options))
{
listboxPictures.Items.Add(blobItem.Uri.ToString());
iTotalPictures ++;
lblTotal.Text = "Total frames: "+Convert.ToString(iTotalPictures);
pictureBox1.ImageLocation = blobItem.Uri.ToString(); // This is the display box, this works only with public settings on the container
}
これは機能しますが、コンテナーがパブリック(Azureコントロールパネルで設定)の場合にのみ機能します。ただし、コンテナをプライベートにしたときに画像を取得したいと思います。
誰が私を助けてくれますか?
(説明が明確に十分であることを願っています)
blobcontainer設定がパブリックの 場合のアプリケーションblobcontainer設定がプライベートの場合のアプリケーション