/**
上传头像
接口说明
此接接口以POST方式请求。
请求说明
http://124.207.188.52/firmail/app/imgupload/upload?uid=111&file=图片二进制流
参数说明
uid
用户id
file
图片的二进制流
*/
-
(void)asiUploadIcon
{
NSURL *url = [NSURL URLWithString:@"http://124.207.188.52/firmail/app/imgupload/upload?uid=111FF99E000000000005&file="];
ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:url];UIImage *image = [UIImage imageNamed:@"error.png"];
NSData *imageData = UIImagePNGRepresentation(image);request.delegate = self;
[imageData writeToFile:fullPath atomically:NO];
[request setData:imageData forKey:@"f"];
[request startAsynchronous];
}
上传图片到服务器,但是服务器那边显示的空,请问那外大神帮我看一下代码。