NSURL* url = [NSURL URLWithString:@"ios開發教程www.51ios.net"]; 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[]"]; } } NSURL* url = [NSURL URLWithString:@"ios開發教程www.51ios.net"]; 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[]"]; } }