ASIHTTP method for posting a video

259 views Asked by At

I am using ASIHTTP method for uploading my video information.I got my video information in web data using the code

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
NSLog(@"image picker did finish");
NSURL *videopath = [info objectForKey:UIImagePickerControllerMediaURL];

    NSData *webData = [NSData dataWithContentsOfURL:videopath];

    [webData release];}

from this web data how can i post it using 'setdata'@"" for key@""; anyone can help me?

1

There are 1 answers

0
Ugur Kumru On

You can use it like this :

ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setData:webData withFileName:@"" andContentType:@"video/avi" forKey:@"video"];