我可以使用我的代码成功发布文本字段但现在我想上传用户图像以及用户数据我是IOS开发的新手请帮忙
NSString *post =[[NSString alloc] initWithFormat:@"company_name=%@&designation=%@",[txtCompanyName text],[self.txtDesignation text]];
NSURL *url=[NSURL URLWithString:@"http://profile/api/profile"];
NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
NSString *postLength = [NSString stringWithFormat:@"%lu", (unsigned long)[postData length]];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
[request setURL:url];
[request setHTTPMethod:@"POST"];
[request setValue:postLength forHTTPHeaderField:@"Content-Length"];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
[request setValue:token forHTTPHeaderField:@"X-Auth-Token"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody:postData];