Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hello,
I'm using the sync API to upload and download a drawn image across iOS devices. I've added a file system observer to respond to any file changes. However the API caching of the image seems to be causing issues. The image uploads fine, I can see it updated on Dropbox, I'm getting notified on my other device of the update through the observer, however the DBFile that I open to reference the image contains the old version, even after I use the update function on the DBFile. If I set the file system maxFileCacheSize to 0, then everything is working as expected. Any ideas on what could be wrong?
Alright, so I wasn't aware of how update doesn't block until the file downloads, so I added an observer should newerStatus not be nil and once download progress was at 1.0 I called update and surely enough DBFile now references the proper version of the file. Hope this helps someone in the future.
That's correct, reading a file will always give you any cached content first, not blocking on the download of new content (unless there is no cached copy), so you should use an observer to know when the new content is available and update to it. You can find more information here:
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
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!