Uploading images to a folder using the SDK I would like to get the original link to the image. I have searched the the metaData from DMMetaData using the method below. There are several methods owned by DBMetaData such as "root" and "content" but I always recieve a Null response. If anyone could possibly lead me in the right direction to grab that information from the response that would be greatly appreciated!
-(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);
}
To get a sharable link for a file in DropBox !
There is a method in DBRestClient.h that you should take a look at!
and their delegate Methods as well!!
example : let us consider i have a file MyContacts in my Dropbox then to share it ,
and their delegate methods