You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Mohammed E.
10 years agoNew member | Level 1
Sync API and caching
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?
- Mohammed E.New member | Level 1
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.
- Greg-DBDropbox Staff
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:
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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 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!