locked
Is it possible to prevent OneDrive from uploading some specified files to its server?

    Question

  • I want to save my files on OneDrive document folder, but some of the file is too large so I don't want them to be synced. My question: How can I do this in C#(Windows store apps)? Can I just specify some relate property of the file to prevent it from being synced?
    Saturday, January 31, 2015 3:30 AM

Answers

  • For help with user control over OneDrive check out http://answers.Microsoft.com or ask on the IT Pro forums on TechNet.

    The way SqlLite is implemented it can only open databases in the app's install or app data directories. It cannot access a database in the document folders. Windows Store apps cannot directly share a SQLite database.

    For enterprise purposes you could expose the SqlLite database through a web service or external component. See the Enterprise docs for information on enterprise specific capabilities which can help with this.

    • Marked as answer by silverbird2015 Saturday, January 31, 2015 6:07 AM
    Saturday, January 31, 2015 5:15 AM
    Owner

All replies

  • If you don't want files uploaded to OneDrive from your app then don't save them to the OneDrive folder. The app doesn't have any knowledge or control over what happens once they've been saved.

    Saturday, January 31, 2015 4:17 AM
    Owner
  • Thanks, Rob! So there is no way to prevent a file from being synced by OneDrive sync engine?

    To be honest, I think a Windows user sometimes do hope he can have a little more control over the behavior of this engine, for example, like what I said, to prevent a file to be synced maybe by specifying its file property.

    There is lots of circumstances that we have to put a file to onedrive document folder and it is too large and no need to be synced, i.e. sometimes we do want a folder in onedrive ducment foler to be partially synced.

    Besides my situation, another good example is sharing Sqlite database files across different apps(in the same machine) by putting them in OneDrive Document folder. (AFAIK, besides this, there is no other good way to share Sqlite database files). Since the database files would be update frequently, so it would be a heavy burdern for OneDrive to sync them automatically.(And obviously there is no need to do this either!)

    btw: can you shed some light on how to share Sqlite files between two apps(Enterprise deployed)? thanks!

    Saturday, January 31, 2015 4:46 AM
  • For help with user control over OneDrive check out http://answers.Microsoft.com or ask on the IT Pro forums on TechNet.

    The way SqlLite is implemented it can only open databases in the app's install or app data directories. It cannot access a database in the document folders. Windows Store apps cannot directly share a SQLite database.

    For enterprise purposes you could expose the SqlLite database through a web service or external component. See the Enterprise docs for information on enterprise specific capabilities which can help with this.

    • Marked as answer by silverbird2015 Saturday, January 31, 2015 6:07 AM
    Saturday, January 31, 2015 5:15 AM
    Owner