title: Android upload video to remote server using HTTP multipart form data
body: <p>I'm having trouble on a certain piece of a current project and feel like I'm stuck right now.   I'm trying to do a video upload with an HTTP post and multipart form data.  I feel like I'm hit a wall in understanding the HTTP protocol and specifically multipart form data.  </p>
  
  <p>I have a URL to upload videos to in the format <a href="http://videoupload.thecompany.com/VideoApp.xml?method=upload&amp;objectType=person&amp;objectId=777777" rel="nofollow noreferrer">http://videoupload.thecompany.com/VideoApp.xml?method=upload&amp;objectType=person&amp;objectId=777777</a>.  I also need to include a title, description, and the videoFile of course.  Are these the "multipart data"?  </p>
  
  <p>I've tried adapting this solution to meet my needs <a href="https://stackoverflow.com/questions/5017093/upload-video-from-android-to-server">Upload video from Android to server?</a>, and setting the extra data following all the other conn.setRequestProperty() calls  like so:</p>
  
  <pre><code>conn.setRequestProperty("title", "video title");
  conn.setRequestProperty("description", "video description");
  </code></pre>
  
  <p>But this isn't working for me.  There's a comment from the original author of the code to add multipart form data about 30 lines later, but I don't understand why. Thanks for any help.</p>