title: mapping a curl command to equal python requests function
body: <p>Really would appreciate some help to understand what I'm missing.
  I have a working curl command that I need to map to an equal python function using requests.</p>
  
  <p>All my attempts end up failing with a message of : <br>
  requests.exceptions.ConnectionError: ('Connection aborted.', error(32, 'Broken pipe'))</p>
  
  <p>The original curl command is:<br>
      curl -X POST "<a href="https://x.x.x.x/api/upload" rel="nofollow noreferrer">https://x.x.x.x/api/upload</a>" -H "accept: application/json" 
      -H "authorization: Basic BlaBla" -H "Content-Type: multipart/form-data" 
      -F "file=@SomeFile.zip;type=application/zip"</p>
  
  <p>My failing python code is:</p>
  
  <pre><code>def importZip(self, fAuth, infile, dir=''):
      trgtURL = fAuth.url+"/api/upload"
      headers = {'Content-Type': 'multipart/form-data'}
      data = {'upload':''}
      files = {'file': (infile, open(dir+infile,'rb'))}
      r = fAuth.session.post(trgtURL, files=files, data=data)
  </code></pre>
  
  <p>fAuth is just a class I use to authenticate and retain the session for follow up calls. I can use the fAuth instance to do gets no problem, so I suspect the problem isn't tied to the underlying session.<br><br>
  Any ideas or insight are greatly appreciated.</p>