cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Dropbox Client sync

Dropbox Client sync

SrustiThakkar
Helpful | Level 6

Hello,

 

Can you tell me how Dropbox client works? Because whenever I made changes on Dropbox Server it sync data with my desktop immediately. I want to create my own client and perform sync same as dropbox client using Dropbox API. So please can you provide some example on dropbox client sync operation.

6 Replies 6

Greg-DB
Dropbox Staff
Unfortunately I don't have any specific technical information to share about the Dropbox desktop client.

In short, it both listens for changes from the Dropbox servers and performs the same operations locally, and listens for changes on the local filesystem and performs the same operations on the server to match.

The Dropbox API enables you to list, upload, and download files on the Dropbox server, so you can use it to implement something similar. You'll need to investigate the functionality available for your local filesystem for the other part though (for detecting local changes to sync up to the Dropbox API).

Ed-
Explorer | Level 4

SrustiThakkar ha escrito:

Hello,

 

Can you tell me how Dropbox client works? Because whenever I made changes on Dropbox Server it sync data with my desktop immediately. I want to create my own client and perform sync same as dropbox client using Dropbox API. So please can you provide some example on dropbox client sync operation.


I can add that you need to use the /list_folder/longpoll API for being notified about changes in Dropbox files or folders.

 

The drawback is that you need to upload or download the whole file for any change, no matter if it has 1 GB and only changed two bytes.

 

Ed-
Explorer | Level 4

And about being notified about changes in the Windows file system, read this.

SrustiThakkar
Helpful | Level 6

Thank You for your Help.

SrustiThakkar
Helpful | Level 6
As you said use FileSystemWatcher Class for listen local directory changes, I have used it. And for listen server side changes I have used list_folder_continue method of Dropbox API. The problem is If new file Uploaded on server then it download in local directory,but when file is downloaded and created, It call FileSystemWatcher Created Method and Upload Same file on the server. How can i manage that if file is download then watcher event doesn't fire.

Ed-
Explorer | Level 4
Your program should keep track of the files it downloads and ignore those notifications.
Need more support?