I have successfully uploaded image using the following code
NSData *data = UIImageJPEGRepresentation([UIImage imageNamed:@"background.png"], 1);
SFRestRequest *request = [[SFRestAPI sharedInstance] requestForUploadFile:data name:@"image.jpeg" description:@"mobile App" mimeType:@"image/jpeg"];
[[SFRestAPI sharedInstance] sendRESTRequest:request failBlock:^(NSError *err){
NSLog(@"upload error:%@", err.description);
} completeBlock:^(id response){
NSLog(@"upload Complete = %@", response);
}];
Now i have no idea where am i uploading this image. Saw this on a code snippet that this api uploads image to Chatter Repo.
I have to send some images or videos with every record on salesforce. and some person in the backend should be able to check the record and the images and videos associated with the record.