title: How to download the file from online azure blob storage
body: <p>When I tried to download the image file from the online azure blob, it throws exception as "The given path's format is not supported". My code block is below:</p>
  
  <pre><code>StorageCredentials creds = new StorageCredentials(accountName, accountKey);
  CloudStorageAccount account = new CloudStorageAccount(creds, useHttps: true);
  CloudBlobClient client = account.CreateCloudBlobClient();
  container = client.GetContainerReference(blobName);
  
  
  CloudBlockBlob blockBlob = container.GetBlockBlobReference(MyPath);
  await blockBlob.DownloadToFileAsync(Path, FileMode.OpenOrCreate);
  
  
  using (var fileStream = System.IO.File.Create(Path))
  {
      await blockBlob.DownloadToStreamAsync(fileStream);
  }
  </code></pre>
  
  <p>If I provide the local path as "c:\users\Joy\Downloads" in path,as like below:</p>
  
  <pre><code>var localPath = @"C:\Users\Joy \Downloads\user.jpg" ;
  await blockBlob.DownloadToFileAsync(localPath, FileMode.OpenOrCreate);
  
  using (var fileStream = System.IO.File.Create(localPath))
  {
      await blockBlob.DownloadToStreamAsync(fileStream);
  }
  </code></pre>
  
  <p>It can be copied into corresponding location. But I couldn't download the file in my custom location.</p>