0

In my iOS application, I'm integrating dropbox api to upload files.
While creating app in dropbox.com, i found 2 options. One is full folder availability and one is only "App Folder". I opted for "App folder" and gave a folder name as "xxx".
Then I'm calling the following method that takes full file path as parameter.

-(void)uploadFile:(NSString*)filePath
{
    NSString *destDir = @"/";
    [[self restClient] uploadFile:[filePath lastPathComponent] toPath:destDir
                    withParentRev:nil fromPath:filePath];
}

The problem is that the destination directory shouldn't be "/" because I want to upload to "xxx" folder. Even I tried providing destination directory as "xxx" and "/xxx", but it still didn't work out.

Can some one point out what's the wrong thing that I'm doing?

4

1 回答 1

1

We must be very careful how you are initilazing the DBSession. as mentioned by "omz" in above comments, we have to provide appropriate key if its kDBRootDropbox or kDBRootAppFolder. In my case I'm using 2 different types of accounts which is the main reason for failure.
I'm very thankful to "omz"

于 2013-05-10T02:40:48.957 回答