In my application i want to upload the images to server.
I am able to upload images on server but the name of the image mention in front of filename=%@.jpg. remains
change
[body appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"userfile\"; filename=\"%@.jpg\"\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
to
[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userfile\"; filename=\"%@.jpg\"\r\n",filename] dataUsingEncoding:NSUTF8StringEncoding]];
where filename is a NSString* variable with your desired filename