Click here to Skip to main content
15,890,670 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello, I want to develop a client just like OneDrive Desktop Client.

I have created Web Application. In that I have used OneDrive Rest API to perform basic operations. Now I want to develop a desktop client and perform same action just like OneDrive Desktop Client do.

How can I start to develop a client? What are the initial task when fist time linking local folder with OneDrive and how to sync data on regular basis?

Thank you

What I have tried:

Link to OneDrive items sample | Dev
Posted
Updated 17-May-17 21:31pm
v2

1 solution

Since, you already have a web application why don't you just go away and create an API in your own application; if I had to do this, I would definitely, do it like this. This would have various benefits, you won't need to expose your API keys for application to everyone who uses your application. All of your keys would be safe on your web server, and people would be consuming your services.

Also, it would be better, because you would just be extending your web application to another extent, and allowing customers to consume your web application. OneDrive Rest API can be used easily with Desktop applications using .NET framework's HttpClient, the problem is that you will be rewriting the same code again and again.
 
Share this answer
 
Comments
Srusti Thakkar 18-May-17 6:51am    
As you have mention that I have to create my custom WEBAPI, I have create that but now I want to create just like OneDrive Desktop Client and sync data two way. How it can be possible?
Afzaal Ahmad Zeeshan 18-May-17 7:12am    
For that, you would need to write a client that checks for the data online and offline, both ways.

What exactly do you have at the moment? Theoretically we cannot help you at all.
Srusti Thakkar 19-May-17 0:10am    
I have create one Windows Service in which I have use FileSystemWatcher Class and perform action on create, rename change or delete. Whenever these actions are performed on local directory, I have call Rest API and sync local data on OneDrive, but whenever user make changes on OneDrive, Using Delta request list all changes and try to sync with local directory. It works fine but whenever delta request try to sync data, FileSystemWatcher event perform and try to sync local changes to OneDrive. How can I use sync logic to maintain changes?
Afzaal Ahmad Zeeshan 19-May-17 5:10am    
You could possibly disable the service when your app is downloading the updates from OneDrive, and then restart it afterwards.

For an answer, please a have look at this answer by Sergey.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900