ASIFormDataRequest *uploadImageRequest= [ ASIFormDataRequest requestWithURL : [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] ]];
[uploadImageRequest setStringEncoding:NSUTF8StringEncoding];
[uploadImageRequest setRequestMethod:@"POST"];
[uploadImageRequest setPostValue:studentsID forKey:@"studentId"];
[uploadImageRequest setPostValue:classId forKey:@"classId"];
[uploadImageRequest setPostValue:userId forKey:@"userId"];
[uploadImageRequest setPostValue:kindId forKey:@"kindId"];
[uploadImageRequest setPostValue:partitionCode forKey:@"partitionCode"];
[uploadImageRequest setPostFormat:ASIMultipartFormDataPostFormat];
for (UIImage *eImage in imagesArray)
{
NSData *imageData=UIImageJPEGRepresentation(eImage,100);
NSString *photoName=[NSString stringWithFormat:@"%@.jpg",[self dateString]];
NSString *photoDescribe=@" ";
NSLog(@"photoName=%@",photoName);
NSLog(@"photoDescribe=%@",photoDescribe);
NSLog(@"图片大小+++++%d",[imageData length]/1024);
//照片content
[uploadImageRequest setPostValue:photoDescribe forKey:@"photoContent"];
[uploadImageRequest addData:imageData withFileName:photoName andContentType:@"image/jpeg" forKey:@"photoContent"];
}
[uploadImageRequest setDelegate : self ];
[uploadImageRequest setDidFinishSelector : @selector (responseComplete:)];
[uploadImageRequest setDidFailSelector : @selector (responseFailed:)];
[uploadImageRequest startAsynchronous];