1
我已經在Iphone中編寫了客戶端代碼。使用webservice從.NET服務器上的Iphone應用程序上傳視頻
self.postRequest = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:@"http://Services/UploadVideo.asmx"]];
NSString *urlString=[self.videoURL path];
NSLog(@"urlString=%@",urlString);
[self.postRequest setFile:urlString forKey:@"videoUrl"];
[self.postRequest setRequestMethod:@"POST"];
[self.postRequest setDelegate:self];
[self.postRequest setDidFailSelector:@selector(postFailed:)];
[self.postRequest setDidFinishSelector:@selector(postSuccessful:)];
[self.postRequest startAsynchronous];
LOG output:// urlString=/private/var/mobile/Applications/09108E9E-1494-4C25-8C3E-328B95BD1504/tmp/capture-T0x1e569fd0.tmp.w37766/capturedvideo.MOV
我該如何捕獲它並將它保存在服務器上? 在此先感謝..
感謝您的幫助!但你可以給我一些建議,可以直接上傳文件。 – Amol
多數民衆贊成我已經告訴你的答案,你只需要將視頻轉換爲base64,然後你可以發送base64字符串到你的服務器作爲郵寄參數,這就是它 – Pradeep