cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

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: 
Highlighted

Dropbox Client sync

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
Highlighted

Re: Dropbox Client sync

Dropboxer
Dropboxer
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).
Highlighted

Re: Dropbox Client sync

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.

 

Highlighted

Re: Dropbox Client sync

Explorer | Level 4

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

Highlighted

Re: Dropbox Client sync

Helpful | Level 6

Thank You for your Help.

Highlighted

Re: Dropbox Client sync

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.
Highlighted

Re: Dropbox Client sync

Explorer | Level 4
Your program should keep track of the files it downloads and ignore those notifications.
Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

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.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?