// 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("mycontainer"); // Retrieve reference to a blob named "photo1.jpg". CloudBlockBlob blockBlob = container.GetBlockBlobReference("photo1.jpg"); // Save blob contents to a file. using (var fileStream = System.IO.File.OpenWrite(@"path\myfile")) { blockBlob.DownloadToStream(fileStream); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)