This project is read-only.
Uploading file

Using DropBoxy you can upload file to your DropBox account. Please use next code to do so:
        private void button1_Click(object sender, RoutedEventArgs e)
            Action<bool> callback = UploadCompleted;

            DropBoxy.DropBoxyEngine engine = new DropBoxy.DropBoxyEngine();
            engine.ApiKey = "api key";
            engine.ApiSecret = "api secret";

            engine.SetToken("usertoken", "usersecret");
            engine.UploadFile(string.Empty, "newtxt.txt", new byte[] { 32, 3, 2 }, callback);

This peace of code will ask DropBox to create file "newtxt.txt" in the root folder, and content of the file will contain 3 bytes. You can upload file up to 300MB size.

To upload file not to root folder pleaes use next signature:
engine.UploadFile("/Public", "newtxt.txt", new byte[] { 32, 3, 2 }, callback);

This code will upload same file into Public folder of your account.

Last edited Jan 15, 2011 at 2:21 PM by dimko1, version 1


No comments yet.