FTP upload iphone sdk -


I need a single file ASIRequest Have tried or whatever is said, but want to do something with a detailed guide.

Would you like to use ASIFormDataRequest. You will send your file as NSDTA object in the request. Here is an example of sending a JPEG. If you have some other file type, you have to convert it to NSDTA object for transmission on the server.

  NSString * filename = @ "image.jpg"; UIImage * image = [UIImage imageNamed: @ "image.jpg"]; NSDTA * FileData = UIImageJPEG Report (Image, 0.9); ASIFormDataRequest * Request = [ASIFormDataRequest requestWithURL: [NSURL urlWithString: @ "http://www.yoursite.com"]]; [Request setPostValue: file name for: @ "name"]; [Request SetData: fileData forKey: @ "file"]; [Set time timeset: 500]; [Request Security Mode: @ "Post"]; [Request [synchronous]]; // Server response handle  

In the section titled ASI document "Sending a form post with ASIFOMRADEAST" -


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -