Is there an endpoint in the API to get only the first n (let's say 100) bytes of a file.
I don't want to download the whole file.
@Ratmil,
The /files/download endpoint is a "content-download" style endpoint, meaning when a /files/download call is successful, the file data is returned in the response body. Exactly what you do with that resulting data is up to you. So, while the Dropbox API does not offer the option to return a pre-set amount of data on request, you do have the option to handle that on your integration.
You can find the documentation for the different request and response formats here: https://www.dropbox.com/developers/documentation/http/documentation#formats
Hi @Ratmil,
I wanted to follow up as I realized I forgot to mention that our "content-download" endpoints support HTTP range requests.
This means you can actually specify a range in the request headers, such as the first 100 bytes of a file, using the Range header.