Essayez ceci.
How to upload an image in iPhone application
et ce
How can I upload a photo to a server with the iPhone?
EDIT:
NSMutableURLRequest *urlRequest =
[NSMutableURLRequest requestWithURL:url];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:
[NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundry]
forHTTPHeaderField:@"Content-Type"];
NSMutableData *postData =
[NSMutableData dataWithCapacity:[data length] + 512];
[postData appendData:
[[NSString stringWithFormat:@"--%@\r\n", boundry] dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:
[[NSString stringWithFormat:
@"Content-Disposition: form-data; name=\"%@\"; filename=\"file.bin\"\r\n\r\n", FORM_FLE_INPUT]
dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:data];
[postData appendData:
[[NSString stringWithFormat:@"\r\n--%@--\r\n", boundry] dataUsingEncoding:NSUTF8StringEncoding]];
[urlRequest setHTTPBody:postData];
Vérifiez également la vidéo: http://www.youtube.com/watch?v=aQXaJO36I7Y
L'enfant est exp définir les choses assez facilement .Vous pouvez faire la chose avec cette vidéo.
Vous aurez également besoin d'un script php pour analyser l'image côté serveur.
Son ne fonctionne pas ... aucun code n'est dere. – Rahul