ファイルをWindowsAzureBLOBストレージにアップロードしようとしています。私の理解では、サブディレクトリに似たものにファイルをアップロードできます。ファイルが基本的にに存在するように、ファイルをBLOBにアップロードしたい/TestContainer/subDirectory1/subDirectory2/file.png
// Setup the Windows Aure blob client
CloudStorageAccount storageAccount = CloudStorageAccount.FromConfigurationSetting("BlobStorage");
CloudBlobClient client = storageAccount.CreateCloudBlobClient();
// Retrieve the TestContainer container from blob storage
CloudBlobContainer container = client.GetContainerReference("TestContainer");
if (container.CreateIfNotExist())
container.SetPermissions(new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Blob });
// Setup the blob
CloudBlob blob = container.GetBlobReference("");
// Create the meta data for the blob
NameValueCollection metadata = new NameValueCollection();
metadata["id"] = fileID.ToString();
blob.Metadata.Add(metadata);
// Store the blob
byte[] bytes = GetFileBytes();
blob.UploadByteArray(bytes);
ディレクトリ構造のファイルをアップロードするにはどうすればよいですか?ここのリンクはそれをする方法があると述べています。ただし、その方法は示されていません。
ありがとうございました!