I am using
imageData = UIImagePNGRepresentation(imgvw.image);
and while posting
[dic setObject:imagedata forKey:@\"image\"];
Try this
NSData *imageData = [UIImageJPEGRepresentation(self.photoImageView.image, compression) dataUsingEncoding:NSUTF8StringEncoding];
const unsigned char *bytes = [imageData bytes];
NSUInteger length = [imageData length];
NSMutableArray *byteArray = [NSMutableArray array];
for (NSUInteger i = 0; i length; i++)
{
[byteArray addObject:[NSNumber numberWithUnsignedChar:bytes[i]]];
}
NSDictionary *dictJson = [NSDictionary dictionaryWithObjectsAndKeys:
byteArray, @"photo",
nil];
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dictJson options:0 error:NULL];