Here is my code.
UIImage *img = [UIImage imageNamed:@\"white.jpeg\"]; NSData *imageData = UIImagePNGRepresentation(img); NSString *imageString = [imageData
Yap, I find the problem is I don't encode the url.
In the post data my base64 "+" character was translate to " " character.
So I get the invalid base64 string.
Thanks Logan.