-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info{
NSLog(@"选择了图片:%@",[info objectForKey:UIImagePickerControllerEditedImage]);
NSLog(@"dictionary:%@",info);
[self.picShow setImage:[info objectForKey:UIImagePickerControllerEditedImage] forState:UIControlStateNormal];
NSString *path=@"http://www.12311148.com";
AFHTTPRequestOperationManager *manager=[AFHTTPRequestOperationManager manager];
manager.responseSerializer=[AFHTTPResponseSerializer serializer];
[manager POST:path parameters:@{@"user":@"15"} constructingBodyWithBlock:^(id formData){
UIImage *image=[info objectForKey:UIImagePickerControllerEditedImage];
NSData *data=UIImagePNGRepresentation(image);
[formData appendPartWithFileData:data name:@"file" fileName:@"1.png" mimeType:@"image.jpg"];
}success:^(AFHTTPRequestOperation *operation,id responseObject){
NSString *str=[[NSString alloc]initWithData:responseObject encoding:NSUTF8StringEncoding];
NSLog(@"%@",str);
}failure:^(AFHTTPRequestOperation *operation,NSError *error){
NSLog(@"%@",error.description);
}];
[picker dismissViewControllerAnimated:YES completion:nil];
}