It only needs to be a one way sync (from dropbox to the server) Any recommended libraries/tutorials/endpoints to do this?
[ same q dif platform https://stackoverflow.com/questions/61755432/dropbox-server-integration-php-library ]
Dropbox doesn't offer a pre-built library or tutorial for a sync client, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
The Dropbox API does offer the ability to list, upload, and download files programmatically though, among other operations, so you can implement whatever kind of syncing you need in your app's code.
For example, to list files and folders:
To download files:
To upload files:
to further the quality of my question - I hope this helps:
Q: describe the problem and what has been done so far to solve it
A: the problem is im not sure what mechanism to use to determine changes to dropbox app folder, maybe webhooks?
Webhooks can tell you when something changed, but not what changed. To find out what changed, you would then use the list_folder endpoints. In addition to letting you list the contents, the list_folder endpoints also enable you to keep track of new changes over time:
I also recommend reviewing the Content Access Guide for some more information.
Ok so how do i find out what changed? is it a file property?
please dont tell me ur refering to the date modified property? unless that could work as i could say "if it has changed in the last five minutes after the webhook fired then download it"...
Side note: Is there a statergy for this requirement or am i the only person in the world who has ever considered such things? lol
You can store the last received cursor from /2/files/list_folder or /2/files/list_folder/continue and then call back later to /2/files/list_folder/continue with that cursor. The response will contain entries for the changes since you last called. Check out the /2/files/list_folder documentation for more information on how to process these entries.
Exactly how you write your code will depend on what exactly you need your app to do of course, but I imagine other people have implemented things like this. Perhaps others on the forum can offer some insight on their experience when doing so if they see this thread.
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.Sound good? Let's get started.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!