我正在更改应用的连接对象,直到昨天我使用了AsiHttpRequest
:
[request setData:imgDataBig withFileName:@"imagename" andContentType:@"image/jpeg" forKey:@"image"];
[request setData:imgDataThumb withFileName:@"thumbname" andContentType:@"image/jpeg" forKey:@"thumb"];
现在我正在使用SthttpRequest
,并复制AsiHttpRequest
我尝试过此代码:
[request setDataToUpload:imgDataThumb parameterName:@"thumb" mimeType:@"image/jpeg" fileName:@"thumbname"];
[request setDataToUpload:imgDataBig parameterName:@"image" mimeType:@"image/jpeg" fileName:@"imagename"];
使用SthttpRequest
只会发送一个,如何复制我在AsiHttpRequest
中完成的多图片上传?
答案 0 :(得分:3)
解决了,我必须下载最新版本的SthttpRequest,在上一版本中我找到了一种新的多重上传方法:
[request addDataToUpload:imgDataThumb parameterName:@“thumb”mimeType:@“image / jpeg”fileName:@“thumbname”]; [请求addDataToUpload:imgDataBig parameterName:@“image”mimeType:@“image / jpeg”fileName:@“imagename”];