title: Python requests - POST Multipart/form-data
body: <p>I am trying to make a multipart/form-data post request using python "requests" library the request payload is this</p>
  
  <pre><code>------WebKitFormBoundaryFpBudhNO5RIwvCAv
  Content-Disposition: form-data; name="token"
  
  nwcnfie_3c59dc048e8850243be8079a5c7
  ------WebKitFormBoundaryFpBudhNO5RIwvCAv
  Content-Disposition: form-data; name="uid"
  
  3f7316b6fee4de110e0ab5db7ccdd9df9373
  ------WebKitFormBoundaryFpBudhNO5RIwvCAv
  Content-Disposition: form-data; name="terms"
  
  1
  ------WebKitFormBoundaryFpBudhNO5RIwvCAv
  Content-Disposition: form-data; name="movie_title637ee6f6c51cef5a4887c67116bd7375"
  
  this one is the most awesome movie
  ------WebKitFormBoundaryFpBudhNO5RIwvCAv
  Content-Disposition: form-data; name="description637ee6f6c51cef5a4887c67116bd7375"
  
  
  ------WebKitFormBoundaryFpBudhNO5RIwvCAv
  Content-Disposition: form-data; name="files[]"; filename="Time Value of Money -    YouTube.FLV"
  Content-Type: video/x-flv
  
  
  ------WebKitFormBoundaryFpBudhNO5RIwvCAv--
  </code></pre>
  
  <p>Here is how I am trying to POST this</p>
  
  <pre><code>files = {'files[]': ("filename", open('Time Value of Money -    YouTube.FLV', 'rb'))}
  upload_payload = {"token":"nwcnfie_"+getUploadToken(user_page.text),"uid":getUID(user_page.text),"terms":"1","movie_title"+getFileNameHash("Time Value of Money -    YouTube.FLV"):"This is a really awesome movie","description"+getFileNameHash("Time Value of Money -    YouTube.FLV"):"Awesome"}
  response = session.post("http://example.com/uploader.php",data=upload_payload,files=files)
  </code></pre>
  
  <p>Is this the correct way of doing the request especially the file part? I am not getting the result I was expecting. Please help.</p>