title: How to convert blob into byteArray in flask python?
body: <p>A customer sends a multipart file to me, I read it with:</p>
  
  <pre><code>    blob = request.files['file'].read()
  </code></pre>
  
  <p>I have a blob file in hand. Now I have to send this file with requests like <code>open('file.png', 'rb')</code>. How can I convert <code>blob</code> to something like <code>rb</code> mode. With <code>open</code> I could not open blob directly.</p>
  
  <p>The below code did not work:</p>
  
  <pre><code>opened_file = open(request.files['file'], 'rb')
  </code></pre>
  
  <p>And I got the following error:  </p>
  
  <pre><code>TypeError: coercing to Unicode: need string or buffer, FileStorage found
  </code></pre>
  
  <p>Is there a way to do that <strong>without saving it on file system</strong>? I send my requests to somewhere else:  </p>
  
  <pre><code>files = dict({'file': byteArrayFile})
  r = requests.post(self.url, files=files, headers=headers)
  </code></pre>