I am trying to save a file from dropbox in the following way:
NSString *fileName = [NSString stringWithFormat:@"/newFile.json"];
// Do any additional setup after loading the view, typically from a nib.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString* path2 = [documentsDirectory stringByAppendingPathComponent:
[NSString stringWithFormat:@"%@", fileName]];
[[self restClient] loadFile:fileName intoPath:path2];
the file is under apps/appname/sandbox/newFile.json
but I get this error:
2012-05-12 21:05:46.824 Quick Homework & business[934:707] [WARNING] DropboxSDK: error making request to /1/files/sandbox/newFile.json – File not found
but the file is there!!
I found out that in order to access al dropbox folders, even if in the sandbox folder, your app needs to be set to “full dropbox access”, otherwise this error comes out. this problem though is there only when trying to download from dropbox, not when uploading or when loading the metadata in a UITableView.