Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Have a look on the following code with <strong>ASIFormDataRequest</strong> library.</p> <pre><code>-(IBAction)postPhotoButtonClickedButtonClicked:(id)sender { [textViewStatusBox resignFirstResponder]; NSLog(@"postPhotoButtonClicked"); UIImagePickerController * picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; [self presentModalViewController:picker animated:YES]; } - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { NSString *randomPictureName = [NSString stringWithFormat:@"%@.png", [self generateRandomString]] ; [picker dismissModalViewControllerAnimated:YES]; UIImage *selectedImage = [info objectForKey:@"UIImagePickerControllerOriginalImage"]; NSData *imageData = UIImagePNGRepresentation(selectedImage); ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:@"http://webber.im/iphone/post_library.php"]]; [request setPostValue:@"ASv48umPgx0tyuu9PnjxcQ" forKey:@"key"]; [request addData:imageData withFileName:randomPictureName andContentType:@"multipart/form-data" forKey:@"picture"]; [request setDelegate:self]; [request startSynchronous]; NSError *error = [request error]; if (!error) { NSString *response = [request responseString]; } } </code></pre> <p>Here I have two parameters <strong>key</strong> and <strong>picture</strong>. You can modify it with your own parameters. Hope it would help you a lot.</p> <p>Cheers</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload