使用SDK将影像上传到一个文件夹,我想获得原始链接图像。 我曾尝试使用下面的方法搜索的元数据从DMMetaData。 有通过DBMetaData拥有的几种方法,如“根”和“内容”,但我总是收到一个空的响应。 如果任何人有可能导致我在正确的方向上抢从将不胜感激响应的信息!
-(void)uploadImage:(UIImage *)image{
[sounds PlayUploading:nil];
NSLog(@"upload from uploader!~");
NSData *data = UIImagePNGRepresentation(image);
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask, YES);
NSString *path = [[paths objectAtIndex:0] stringByAppendingString:@"PreviewMaker.png"];
[restClient setDelegate:self];
[data writeToFile:path atomically:YES];
[[self restClient] uploadFile:@"PreviewMaker.png" toPath:@"/"
withParentRev:nil fromPath:path];
}
-(void)restClient:(DBRestClient *)client uploadedFile:(NSString *)destPath
from:(NSString *)srcPath metadata:(DBMetadata *)metadata{
NSLog(@"uploaded: %@ from %@ withData %@",destPath,srcPath,metadata.root);
}