采用AFNetWorking 上传base64的图片到服务器,上传的图片解析不了。ASIHttpRequest上传是可以的,两种写法如下,求教,能给个思路吗?
IOS AFNetworking upload pictures to the server.The request is successful,But it can not parse base64 image.Then same request using ASIHTTPReuqest framework upload base64 images on the server side can parse is successful.Can you give a suggestion or idea?
AFNworking request Code:
UIImage *img = [avatar imageWithImageSimple:avatar scaledToSize:EZSIZE(320, 320)];
NSData* imageData = UIImageJPEGRepresentation(img, 0.5);
NSString *strBase64 = [imageData base64String];
NSDictionary * object = @{
@"firstname" :@"nameTest",
@"sex" :@"male",
@"user_id" :@"1234556",
@
IOS AFNetworking upload pictures to the server.The request is successful,But it can not parse base64 image.Then same request using ASIHTTPReuqest framework upload base64 images on the server side can parse is successful.Can you give a suggestion or idea?
AFNworking request Code:
UIImage *img = [avatar imageWithImageSimple:avatar scaledToSize:EZSIZE(320, 320)];
NSData* imageData = UIImageJPEGRepresentation(img, 0.5);
NSString *strBase64 = [imageData base64String];
NSDictionary * object = @{
@"firstname" :@"nameTest",
@"sex" :@"male",
@"user_id" :@"1234556",
@