Hello,
I have an application which uploads file from iPhone to web server.
Problem is that I want to give users a control like from which they can select the file / photo from the device and which is than uploaded on server.
Can anyone help me
Hello,
I have an application which uploads file from iPhone to web server.
Problem is that I want to give users a control like from which they can select the file / photo from the device and which is than uploaded on server.
Can anyone help me
I think you want to use an ImagePickerController that is the system component to allow a user to choose a photo.
You can get the UIImage content as a JPEG or PNG wrapped in NSData:
NSData *data = UIImageJPEGRepresentation(image, 1);
if( data ) { // it's possible nil may be returned
;// do stuff here.
// see: link to other answer on SO below.
// if you want to write to file, try:
[data writeToFile:filePath atomically:YES];
}
http://stackoverflow.com/questions/936855/file-upload-to-http-server-in-iphone-programming
hi partick ,
Can you please update me for the same i am also trying to upload a image from sdk to webserver.
Thanks,
Sajid