I am developing an app that uses Dropbox SDK to download files from user dropbox account.
I am able to list contents and contentMetadata, but when i try to download them i am always getting the following error:
DropboxSDK: error making request to /1/files/dropbox//SuiteJuridica/navigationBar-start.png - (1000) Error Domain=dropbox.com Code=1000 "The operation couldn’t be completed. (dropbox.com error 1000.)"
I have also developed other app from scratch using the same app credentials and i am able to download the very same file from the same account.
After looking into DBRequest errors error 1000 means Generic error, so that i cannot go further with the causes. Find attached a fragment of code used to download the content from my app:
NSString *api = item.name;
NSString *apiToSend=@/SuiteJuridica;
//apiToSend = [apiToSend stringByAppendingString:[NSString stringWithFormat:@/%@",api]];
NSLog(@the api is :%@", apiToSend);
NSString *filename = [api lastPathComponent];
NSString *destPath = [apiToSend stringByAppendingPathComponent:filename];
destPath=[@/ stringByAppendingString:destPath];
NSLog(@dst path : %@", destPath);
NSLog(@file name : %@", filename);
/*NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSDownloadsDirectory, NSUserDomainMask, YES);
NSString *documentPath = [searchPaths objectAtIndex:0];
*/
NSString *tmpDir = NSTemporaryDirectory();
NSString *tmpFileName = [tmpDir stringByAppendingPathComponent:filename];
NSLog(@temporary directory, %@", tmpDir);
[[self restClient] loadFile:destPath intoPath:tmpFileName];
Thanks in advance for any help