简体   繁体   中英

c# Dropbox RestSharp download part of file

I have an 'ASP.NET' console application, i use the 'RestSharp' client for Dropbox. I need to download part of file from Dropbox (fro example i need to read from 0 byte to 10000 byte) and should not download all file.

I need to send the bytes in request and not get the whole file or save the whole file in local storage or in memory.

/files (GET) in Dropbox API v1 supports HTTP range retrieval requests, so for your example, you can just add the header Range: bytes=0-10001 to your API call.

(I believe that API v2 support for range retrieval is planned but not yet implemented.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM