Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Steven T.
11 years agoNew member | Level 2
Is it possible to load a small part of a file?
I'm using the Sync API on iOS. The app deals with a lot of large data files which have information in their header. I'd like to display this information (perhaps less than 1kb of data) to the user wi...
Jeremy P.3
9 years agoNew member | Level 1
I have the same question, but with regard to the Core API, rather than the Sync API. I need to be able to read the first few lines of a file, in order to decide whether it is appropriate to download. In the Android version of my app I can do this with the Core API by using the DropboxAPI.getFileStream method, and using the returned DropboxInputStream to read just the first bit (4k, in my case) of the file, and then closing the DropboxInputStream. I can then examine the header information I have read, and if the file meets my conditions for downloading, I go ahead and download it using DropboxAPI.getFile.
I don't see any way in the iOS DropboxSDK world to do this kind of partial read. It looks like I am stuck with downloading the entire file with DBRestClient's loadFile:intoPath: method. Am I missing something here?
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!