AFNetworking multiple files upload
问题 I want to upload some images into the server,so I use AFNetWork to post the files. The code is here: UIImage *image1 = [UIImage imageNamed:@"about_app"]; UIImage *image2 = [UIImage imageNamed:@"alter"]; NSArray *array = @[image1,image2]; __block int i = 0; NSMutableURLRequest *request = [[AFNetWorkSingleton shareInstance] multipartFormRequestWithMethod:@"POST" path:@"Mindex/getimg" parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData>formData){ for(UIImage *eachImage in array) {