标签:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
NSURL*
url = [NSURL URLWithString:@"xxx"]; ASIFormDataRequest*
request = [ASIFormDataRequest requestWithURL:url]; request.uploadProgressDelegate
= viewPost.progressView; request.showAccurateProgress
= YES; request.shouldContinueWhenAppEntersBackground
= YES; if
([imageArray count] > 0) { [request
setPostFormat:ASIMultipartFormDataPostFormat]; for
(NSData* data in imageArray) { NSInteger
idx = [imageArray indexOfObject:data]; [request
addData:data withFileName:[NSString stringWithFormat:@"image%d.png",idx] andContentType:@"image/png" forKey:@"photos[]"]; } } |
标签:
原文地址:http://blog.csdn.net/u014311077/article/details/42805323