Reputation: 1723
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
Reputation: 986
You can use it like this :
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setData:webData withFileName:@"" andContentType:@"video/avi" forKey:@"video"];
Upvotes: 0