I finally got this to work, the key was to make sure you load the image first.
You can see a storyboard of the process here.
- (IBAction)uploadImage {
/*
turning the image into a NSData object
getting the image back out of the UIImageView
setting the quality to 90
*/
UIDevice * dev = [UIDevice currentDevice];
NSString *uniqueId = dev.uniqueIdentifier;
NSString *name = @"photo1";
NSData *imageData = UIImageJPEGRepresentation(image.image, 90);
//NSData * imageData = UIImagePNGRepresentation(image);
// NSString *postLength = [NSString stringWithFormat:@"%d", [imageData length]];
NSString *urlString = [@"http://172.16.1.37:8080/tree-selection-tutorial/httpproxy?" stringByAppendingString:@"uid="];
urlString = [urlString stringByAppendingString:uniqueId];
urlString = [urlString stringByAppendingString:@"&name="];
urlString = [urlString stringByAppendingString:name];
urlString = [urlString stringByAppendingString:@"&lang=en_US.UTF-8"];
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
[request setURL:[NSURL URLWithString:urlString]];
[request setHTTPMethod:@"POST"];
NSMutableData *postBody = [NSMutableData data];
//add data field and file data
[postBody appendData:[NSData dataWithData:imageData]];
// ---------
[request setHTTPBody

ostBody];
// now lets make the connection to the web
NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];
NSLog(returnString);
}
- (void)imagePickerController

UIImagePickerControll er *)picker didFinishPickingImage

UIImage *)img editingInfo

NSDictionary *)editInfo {
image.image = img;
[[picker parentViewController] dismissModalViewControllerAnimated:YES];
// need to show the upload image button now
upload.hidden = NO;
}
@end