I am adding in functionality to download a large file into my application using the BackgroundDownloader
/DownloadOperation
functionality. I am using a PushStreamContent
in a Web Api controller to serve the data that's being requested using a GET operation.
I have added in the Accept-Ranges
header to the response that's received from the Web Api controller, however the BackgroundDownloader
doesn't seem to be recognising and attempting to resume downloads. If I call DownloadOperation.Pause()
then DownloadOperation.Resume()
then the download starts again from the start and doesn't attempt to resume.
In fact if I look in the AC\BackgroundTransferApi
folder I can see the .down_data
get deleted when I perform the pause. Looking in the down_meta
file I can see the Accept-Ranges: bytes
header is present and I can see it when looking at the request in Fidder.
What do I need to do on the server side to indicate to the BackgroundDownloader
that it supports a resumable transfer? The MSDN documentation simply states Note Paused or incomplete download operations can only be resumed if the server accepts range-requests.
which I believe I have satisfied.