title: Azure Storage Blob Download Progress Indicator
body: <p>i need a progress indicator when downloading a blob.</p>
  <p>The progress indicator already works when uploading. I'm using the Progresshandler within the <strong>BlobUploadOptions</strong>.</p>
  <p><strong>BlobDownloadDetails</strong> seems to have a progress status. However, I don't know how to integrate it to make it work.</p>
  <p>Here is my code:</p>
  <pre><code>IKeyEncryptionKey key;
  IKeyEncryptionKeyResolver keyResolver;
  
  // Create the encryption options to be used for upload and download.
  ClientSideEncryptionOptions encryptionOptions = new ClientSideEncryptionOptions(ClientSideEncryptionVersion.V2_0)
  {
     KeyEncryptionKey = key,
     KeyResolver = keyResolver,
     // string the storage client will use when calling IKeyEncryptionKey.WrapKey()
     KeyWrapAlgorithm = &quot;some algorithm name&quot;
  };
  
  // Set the encryption options on the client options
  BlobClientOptions options = new SpecializedBlobClientOptions() { ClientSideEncryption = encryptionOptions };
  
  // Get your blob client with client-side encryption enabled.
  // Client-side encryption options are passed from service to container clients, and container to blob clients.
  // Attempting to construct a BlockBlobClient, PageBlobClient, or AppendBlobClient from a BlobContainerClient
  // with client-side encryption options present will throw, as this functionality is only supported with BlobClient.
  BlobClient blob = new BlobServiceClient(connectionString, options).GetBlobContainerClient(&quot;myContainer&quot;).GetBlobClient(&quot;myBlob&quot;);
  
          BlobUploadOptions uploadOptions = new BlobUploadOptions();
          uploadOptions.ProgressHandler = new Progress&lt;long&gt;(percent =&gt;
          {
             progressbar.Maximum = 100;
             progressbar.Value = Convert.ToInt32(percent * 100 / file.Length);
          });
  
  // Upload the encrypted contents to the blob.
  blob.UploadAsync(content: stream, options: uploadOptions, cancellationToken: CancellationToken.None);
  
  // Download and decrypt the encrypted contents from the blob.
  MemoryStream outputStream = new MemoryStream();
  blob.DownloadTo(outputStream);
  </code></pre>