I use the delegate of UIImagePickerController for choosing a photo and put it to the server but the problem is i don't know how can i do that using ASIFormDataRequest and i don't know what key should use for the info parameter?
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
NSString *str = [NSString stringWithFormat:@"http://www.siteweb.com/api/v2/businesses/%@/pics.xml",entry.permalink];
NSURL *url = [NSURL URLWithString:str];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
request.delegate = self;
[request startAsynchronous];
[self dismissModalViewControllerAnimated:YES];
}
Like this:
Get the image like this beforehand: