I have an upload server that appends a new block to an append blob every minute. It appends about 2MB of data for each block:
await blob.AppendBlockAsync(new MemoryStream(data)).ConfigureAwait(false);
While this is running, I need to be able to download the whole append blob at any given time. Let's assume after 20 hours, I need to download the whole append blob, while the upload server continues. 20 hours x 60 minutes x 2MB = 2,400MB. I download like this:
await blob.DownloadToStreamAsync(ms).ConfigureAwait(false);
The issue is that I cannot download 2,400MB in less than one minute. As a result, when the upload server appends another block, the DownloadToStreamAsync method throws an exception:
The remote server returned an error: (412) The condition specified using HTTP conditional header(s) is not met..
DownloadToStreamAsync() includes an overload that allows specifying a Microsoft.WindowsAzure.Storage.AccessCondition, however, it doesn't seem there are any options that will solve this. I'll mark your answer as correct if you can solve this in C# only (not using any tools like AZCopy, etc.). Thank you!