I’m trying to find a way to upload video from UIImagePickerController.
The below code, it returns back a 0 length for video data but I’m positive that the video path is correct because it returns back something like
/private/var/mobile/Applications/22318D96-B5B5-4C92-A8EB-869311275E40/tmp//trim.AE6xnl.MOV
NSString *videoPath = [[info objectForKey:UIImagePickerControllerMediaURL] path];
NSData *videoData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:videoPath ofType:@"mov"]];
int videoSize = [videoData length];
NSLog(@"Video path: %d", moviePath);
NSLog(@"Video size: %d", videoSize);
Any idea what is the correct param to put for pathForResource?
thanks
Do this: