私はあまりにも私のWebサービスと一つのビデオに一つの画像を投稿したいのですが、問題は、それがビデオパートに行くとき、それは私のOPASIHTTPRequestにビデオと画像を投稿する方法は?
に追加NSString *url = [NSString stringWithFormat:@"http://example.com/add_videoxml.php"];
networkQueue = [[ASINetworkQueue alloc] init];
[networkQueue cancelAllOperations];
[networkQueue setShowAccurateProgress:YES];
//[networkQueue setUploadProgressDelegate:progressBar];
[networkQueue setDelegate:self];
[networkQueue setRequestDidFinishSelector:@selector(requestFinished:)];
[networkQueue setRequestDidFailSelector: @selector(requestFailed:)];
request= [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:url]] ;
[request setPostValue:@"284" forKey:@"id"];
[request setPostValue:@"show" forKey:@"show"];
[request addRequestHeader:@"Content-Type"
value:@"multipart/form-data;boundary=---------------------------1842378953296356978857151853"];
NSData *imgData=UIImageJPEGRepresentation(userImage, 0.9);
if(imgData != nil){
[request setFile:imgData withFileName:@"Loveatnight" andContentType:@"image/jpeg" forKey:@"image"];
}
//[request addRequestHeader:@"Content-Type"
// value:@"multipart/form-data;boundary=---------------------------1842378953296356978857151853"];
if(videoData != nil){
[request setFile:videoData withFileName:@"Loveishard" andContentType:@"image/jpeg" forKey:@"uploadfile"];
}// error is come on that line
[request setTimeOutSeconds:500];
//NSLog(@"%@",request);
[networkQueue addOperation:request];
[networkQueue go];
を過剰-悪いエラーを与えるということです私は私のビデオギbecuaseこれを使用
[request setFile:videoData withFileName:@"Loveishard" andContentType:@"video/quicktime" forKey:@"uploadfile"];
はMOVであるが、それは再びエラーにすべての
:ご協力いただきありがとうございます私はこのメートを使用するが、再び過剰悪いエラー\t \t [要求setFile:ビデオデータwithFileName: "ビデオ/ QuickTimeの" forKey:@: "Loveishard" andContentType @ @」ファイルをアップロードする"]; – GhostRider