Reputation: 5037
I'm doing a dropbox app. It uses DropNet, the problem is when I try to download a file from the App's folder, it returns the json:
{"error": "Given request root of "dropbox" but app is an App Folder app."}
That's my code:
static void DownloadFile(string token, string secret) {
var client = new DropNetClient(apikey, apisecret, token, secret);
client.GetFileAsync("/Apps/MY_APP/test.txt",
(response) => {
var content = GetString(response.RawBytes);
Console.WriteLine(content);
},
(error) => {
Console.WriteLine(error.ToString() + " error downloading");
});
}
The file exists on this path. I've tried with "test.txt", "/test.txt" and etc. I guess it's some generic problem, but still? Also the app has rights only in its folder.
Upvotes: 0
Views: 976
Reputation: 8038
There is a property on your instance of DropNetClient called UseSandbox
this changes the requests to use the app folder mode instead of root folder.
Upvotes: 1