ios - 如何将文件上传到 Dropbox ios

标签 ios uitableview dropbox dropbox-api

我正在尝试将文件上传到 Dropbox。上传不工作。下面给出上传方法。

//  RootViewController.m

-(NSString *)getDocumentPath{

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *path = [[paths objectAtIndex:0]stringByAppendingPathComponent:FILENAME];
    return path;
}
-(IBAction)download:(id)sender{
    NSLog(@"download pressed");
    [self.activityIndicator startAnimating];
    [self.restClient loadFile:@"/dbTutorial.plist" intoPath:[self getDocumentPath]];

}
-(IBAction)upload:(id)sender{

    NSLog(@"upload pressed");
    [self.activityIndicator startAnimating];
    NSString *path = [self getDocumentPath];
    [self.itemArray writeToFile:path atomically:YES];
    [self.itemArray uploadFile:FILENAME toPath:@"/" fromPath:path];// When I build this is the warning that I get:NSMutableArray may not respond to -uploadFiletoPath:fromPath


}

非常感谢。任何帮助将不胜感激。

最佳答案

应该是 [self.restClient uploadFile:FILENAME toPath:@"/"fromPath:path];

关于ios - 如何将文件上传到 Dropbox ios,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5933674/

相关文章:

iphone - 自定义 UITableView 重新排序

ios - 如何在 iOS 上取消链接或注销 Dropbox 帐户

dropbox - 是否可以禁用应用文件夹的保管箱通知

ios - 使 UIPickerView 结果导入文本到 UILabel

ios - 单击时删除 UITableViewCells 按钮

ios - 无法解析manifest.json。 ionic v3 --livereload ios 设备

ios - 如何在编辑模式下选择 UITableView 中的多行?

ios - NSURLErrorDomain错误-1021

ios - Autoreleasepool 仅在应用程序结束时耗尽?

ios - 如何删除没有对象和使用 block 定义的观察者?