title: Uploading video with AFNetworking from iPhone app
body: <p>I am posting a video file to server from my iPhone app. Currently I am using HTTP POST method.
  I would like to learn about upload using AFNetworking.
  Hope someone will help me.</p>
  
  <p>Here is the sample HTTP posting now I am using :</p>
  
  <pre><code>NSString *urlString =@"http://example.com/demo/upload_video";
  
  NSMutableURLRequest *request= [[[NSMutableURLRequest alloc] init] autorelease];
  [request setURL:[NSURL URLWithString:urlString]];
  [request setHTTPMethod:@"POST"];
  
  //userid 
  [postbody appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"user_id\"\r\n\r\n%@", appDelegate.userid] dataUsingEncoding:NSUTF8StringEncoding]];
  [postbody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
  
  conn = [[NSURLConnection alloc] initWithRequest:request delegate:self];
  if (conn) {
      webData = [[NSMutableData data] retain];
  }    
  </code></pre>