You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I've downloading large files. Connection bandwidth is low. I want to implement download recovery after disconnect and continue download.
Unfortunetly, I've not found how I can specify offset and size part of requested file review.
Can you help me to do it?
var uri = "https://content.dropboxapi.com/2/files/download";
var request = new HttpRequestMessage(HttpMethod.Post, uri);
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer",AccessToken);
var encodedPath = EncodeNonAsciiCharacters(file.Path);
var args = $"{{\"path\": \"{encodedPath}\"}}";
request.Headers.Add("Dropbox-API-Arg", args);
request.Headers.Range =
new RangeHeaderValue(_msg.Request.Offset, _msg.Request.Offset + _msg.Request.Length - 1);
var response = await httpClient.SendAsync(request,
HttpCompletionOption.ResponseHeadersRead)
.ConfigureAwait(false);
response.EnsureSuccessStatusCode();
Activity
greg-db commentedon Oct 4, 2018
The API v2 /2/files/download HTTPS endpoint itself does support "Range Retrieval Requests", but that's unfortunately not currently implemented in the Dropbox .NET SDK. I'll send this along as a feature request for that, but I can't promise if/when that would be implemented in the SDK.
That being the case, you could implement the HTTPS call directly, outside of the SDK, so you can set the desired Range header.
i1yxa commentedon Oct 5, 2018
Hi!
Just add the code and it will work:
i1yxa commentedon Oct 5, 2018
Better way
mcdis commentedon Nov 14, 2018
Any progress?
risforrob commentedon Nov 14, 2018
Hey all, there is no update on this issue to date.