title: Flask FileStorage object to File Object
body: <p>I have made an api through <code>flask</code> which submit a file and after receiving it on the back end , I want to further upload this to an unknown server using python <code>requests</code> module</p>
  
  <p>The server accepts the file if I do this like -</p>
  
  <pre><code>requests.post(urlToUnknownServer,files={'file':open('pathToFile')})
  </code></pre>
  
  <p>Now my requirement is to get the file param uploaded through flask.<br>
  In flask I get the file as <code>FileStorage</code> object. I don't want to save this on my server, instead directly wants it to upload further.<br>
  So basically I want to convert that <code>FileStorage</code> object to return type of <code>open()</code> function which is <code>file</code>(please correct me here if I am wrong)</p>
  
  <p>I had tried it using - </p>
  
  <pre><code>obj=file(request.files['fileName'].read().encode('string-escape'))
  requests.post(urlToUnknownServer,files={'file':obj})
  </code></pre>
  
  <p>This doesn't work. Can it be possible to do that without saving file on my server.</p>