如何在iphone的dropbox中上传文件?

如何在iphone的dropbox中上传文件?,iphone,dropbox,Iphone,Dropbox,我已经做了代码,将图像从文档目录上传到Dropbox的样本相册。 但它不能像我想的那样工作 我的代码: -(NSString *)getDocumentPath{ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *path = [[paths objectAtIndex:0]stringByAppendingPathCompone

我已经做了代码,将图像从文档目录上传到Dropbox的样本相册。 但它不能像我想的那样工作

我的代码:

 -(NSString *)getDocumentPath{

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
NSString *path = [[paths objectAtIndex:0]stringByAppendingPathComponent:@"image1.jpg"];
NSLog(@"path:%@",path);
return path;
}


-(IBAction)uplaodingPhotos:(id)sender
{
  NSString *path = [self getDocumentPath];
    [[self restClient] uploadFile:@"splash.jpg" toPath:@"/Photos/Sample Album"
                withParentRev:nil fromPath:path]; 
}

在这段代码中,我想将图像image1从文档目录添加到Dropbox中的示例相册中。 但它不会复制图像。现在我该怎么办

请帮忙。
提前感谢。

首先,您需要确保已连接dropbox会话,并且您的rest客户端不是nill


有关更多信息,请检查URL:

首先,您需要确保已连接dropbox会话,并且您的rest客户端不是nill


有关更多信息,请检查URL:

Dropbox已关闭,请使用Google Drive:)Dropbox已关闭,请使用Google Drive:)