How to Pause/Resume file download from Azure Blob in c# ?


  • Hi,

    I have a project which backups important data/files into a compressed zip file and upload it to Azure Blob container. Further whenever required user can view these uploaded files by downloading locally. We have developed a Storage Explorer utility using which user downloads the files. But now I want to add a new feature to the explorer and that is: Pause/Resume or Cancel the download. User should be able to Pause/Resume or Cancel the download on a click of a button.

    Storage Explorer is developed as a WPF (Xaml) application. User selects a particular file and click on Download to download it. So if any error occurs or there is any network connectivity issue, user will pause the download, correct the error and then will resume the download from the same stage where it was paused. Resume should not start the download from the start.

    Could anyone please guide me on how to achieve the Pause/Resume download of Azure Blobs. A quick response will be appreciated.

    Thanks in Advance.


    Monday, April 3, 2017 12:16 PM

All replies

  • Hello,

     I am not versed with Azure but your methodology is fairly straight forward to implement.

    The Server must know how to handle multi-block vs bulk download requests.  These terms

    are outside the way Sockets handle data packets.  You will need code that will allows for

    RX/TX that is like Random Access.  You want the Client to ask for Block[ n ] and the Server

    sends. Then if there is a Pause, both the Client/Server know what has been sent and where

    to Resume. I know it does not seem helpful but its about all I can provide with my knowledge

    of Azure.

     Thanks :)

    Tuesday, April 4, 2017 12:08 AM