Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

Stuart T.'s avatar
Stuart T.
New member | Level 1
11 years ago

Using Sync API to open files when already open

I'm using the iOS Sync API to load in image files and grab there contents and display them in a scroll view. As the user scrolls it loads and unloads images. But I see that once you open a file you cannot open it again. So I am getting errors when it tries to load again. I don't really need to keep the files open, but I cannot find a way to close them, or grab an already open file.

What is the best practice for this? Should I just keep a dictionary of files and there paths? I was trying this but running into memory issues.

  • (DBFile )openFile:(DBPath *)path error:(DBError *)error; // I'm using this function and calling it in a block via: dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block);

2 Replies

Replies have been turned off for this discussion

About Dropbox API Support & Feedback

Node avatar for 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!