Uploading video file to server from iPhone
Posted
by
SshUser
on Stack Overflow
See other posts from Stack Overflow
or by SshUser
Published on 2012-09-03T10:18:50Z
Indexed on
2012/11/13
5:00 UTC
Read the original article
Hit count: 105
I know how to upload images to a server running PHP, but I am stuck on uploading video.
I have used this advice to upload my video file.
Posting method is all ok. What I get on the server is a file of 0 bytes.
My code is below:
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info {
NSURL *videoURL = [info objectForKey:UIImagePickerControllerMediaURL];
NSData *videoData = [NSData dataWithContentsOfFile:[videoURL path]];
}
This videoData is passed in my POST method.
What should I do instead?
© Stack Overflow or respective owner