使用Dropbox api的uploadFileFailedWithError委托,我们可以更好地重定向无法上传的文件,而不是使用超时来玩它。
我执行了以下操作以在投递箱上传多个文件。
- (void)restClient:(DBRestClient *)client uploadFileFailedWithError:(NSError *)error {
NSLog(@"File upload failed with error - %@", error.userInfo);
NSString *myfile=[error.userInfo valueForKey:@"sourcePath"];
[self.restClient uploadFile:@"youfilename" toPath:@"/yourfilepath" withParentRev:nil fromPath:myfile];
}
这样,无法上传的文件将重新尝试上传..