iOS Developer
iOS Developer

Reputation: 1723

ASIHTTP method for posting a video

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?

Upvotes: 0

Views: 259

Answers (1)

Ugur Kumru
Ugur Kumru

Reputation: 986

You can use it like this :

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

Upvotes: 0

Related Questions