title: Unable to upload file to REST API
body: <p>I have this cURL request that I want to convert into a Python Request code.</p>
  
  <p>The cURL content is</p>
  
  <pre><code>curl -H "X-PrettyPrint: 1" 
       -F 'json={"title":"PandaTest"};type=application/json' 
       -F "fileData=@rename.py;type=application/octet-stream" 
       -X POST https://cs31.salesforce.com/services/data/v39.0/connect/files/users/me 
       -H 'Authorization: 00Dp000000.....CqqU0.S_5r' --insecure
  </code></pre>
  
  <p>For more details of the request check the SalesForce docs it contains the HTTP request message - <a href="https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/intro_input.htm#feedElementBatch" rel="nofollow noreferrer">here</a>. Search for the section <code>Upload a file to the Files home</code>. </p>
  
  <p>The Python counter part of it what I've written is</p>
  
  <pre><code>import requests
  
  files = {
              "fileData" : open("rename.py", "rb"),
              "json" : '{"title":"PandaTest"}'
          }
  
  headers = {
                'Authorization': 'OAuth 00Dp00000000u....n3ZGuoZK2wYJRCqqU0.S_5r',
                "Content-Disposition": "form-data 'fileData'"
            }
  
  r = requests.post('https://cs31.salesforce.com/services/data/v39.0/connect/files/users/me/',
                    data=files, headers=headers)
  data = json.loads(r.text)
  
  print data
  </code></pre>
  
  <p>My request is sent successfully but I get an error <code>Missing expected "fileData" binary parameter</code>.I have a feeling the request which I'm trying to send is not formed correctly. Where exactly did I go wrong?</p>
  
  <p>I have a feeling I'm not handling the 2 <code>-F</code> in the cURL request correctly.</p>