NSURL *url =@"yourURL";
ASIFormDataRequest*currentRequest =[ASIFormDataRequest requestWithURL:url];
[currentRequest setPostFormat:ASIMultipartFormDataPostFormat];[currentRequest setRequestMethod:@"POST"];
[currentRequest addData:imgData withFileName:@"file" andContentType:@"image/png" forKey:@"yourFileNameOnServer"];//This would be the file name which is accepting image object on server side e.g. php page accepting file
[currentRequest setDelegate:self];
[currentRequest setDidFinishSelector:@selector(uploadImageFinished:)];
[currentRequest setDidFailSelector:@selector(uploadImageFailed:)];
[currentRequest startSynchronous];
-(void)uploadImageFinished:(ASIHTTPRequest*)request
{
//Your request successfully executed. Handle accordingly.
}
-(void)uploadImageFailed:(ASIHTTPRequest*)request
{//Your request failed to execute. Handle accordingly.
}