我试图下载容器中目录中的pdf blob:folder1 / test.pdf。
我已经尝试了以下但没有运气并搜索了示例,但无法找到任何内容。
// Retrieve storage account from connection string.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));
// Create the blob client.
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
// Retrieve reference to a previously created container.
CloudBlobContainer container = blobClient.GetContainerReference("testcontainer/folder1");
// Retrieve reference to a blob
//CloudBlockBlob blockBlob2 = container.GetBlockBlobReference("test.pdf");
还试过这个:
// Retrieve storage account from connection string.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));
// Create the blob client.
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
// Retrieve reference to a previously created container.
CloudBlobContainer container = blobClient.GetContainerReference("testcontainer");
// Retrieve reference to a blob
CloudBlockBlob blockBlob2 = container.GetBlockBlobReference("folder1/test.pdf");
提前感谢!