1
NSURL *mediaURL=[info objectForKey:UIImagePickerControllerMediaURL];
NSData *videoData=[NSData dataWithContentsOfURL:_videoURL];
NSString *moviePath=[mediaURL path];
SCRFTPRequest *ftpRequest=[[SCRFTPRequest alloc] initWithURL:[NSURL URLWithString:@"ftp://xyz.ca/"] toUploadFile:[mediaURL path]];
ftpRequest.username = @"xyz.ca";
ftpRequest.password = @"buKMH3ko8Nn";
//Specify a custom upload file name (optional)
ftpRequest.customUploadFileName = @"h.MOV";
//The delegate must implement the SCRFTPRequestDelegate protocol
ftpRequest.delegate = self;
[ftpRequest startRequest];
但是這會上傳零大小的文件。如何在iOS中錄製後將視頻上傳到FTP服務器?
我在didFinishPickingMediaWithInfo:delegate方法中使用上面的代碼。 請幫幫我。
我們要上傳文件的FTP directoly,不是通過web服務 – kamalpreet