Im using the below code for uploading
-(void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info
{
NSData * dt = UIImageJPEGRepresentation([info objectForKey:@"UIImagePickerControllerOriginalImage"],1);
NSURL *url = [NSURL URLWithString:@"http://www.mysite.com/myfolder"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setDelegate:self];
[request setData:dt withFileName:@"myphoto.jpg" andContentType:@"image/jpeg" forKey:@"photo"];
[request startAsynchronous];
}
Here, I need to know
▪whether Im using the correct url, some used upload.php in url,what's the need to use .php extensions in url,should there be any php file in my site to upload the image
▪then what is forkey: some of them said three types of key, picture,photo and image,im not sure about it.
▪once I completed uploading images to server,what's the url to download that image, is the below url correct for above code -@"http://www.mysite.com/myfolder/myphoto.jpg"