title: Create response with file as content
body: <p>I'd like to create an http response with an mp4 video as the content<br />
  Following the advice I found <a href="https://stackoverflow.com/questions/40361308/create-a-functioning-response-object">here</a> this is what I have so far:</p>
  <pre class="lang-py prettyprint-override"><code>    resp = Response()
      resp.status_code = 200
      with open(&quot;unit_tests/unit_test_data/testvid 2 - public_2.mp4&quot;, &quot;rb&quot;) as vid:
          resp._content = vid.read(1024 * 1024)
      resp.headers = {&quot;content-length&quot;: &quot;13837851&quot;}
  </code></pre>
  <p>This response is then to be used as follows :</p>
  <pre class="lang-py prettyprint-override"><code>    with open(fname, &quot;wb&quot;) as file:
          for data in resp.iter_content(chunk_size=1024):
              size = file.write(data)
  </code></pre>
  <p>However in the second part, when trying to read the content of my response I get the following error:</p>
  <pre><code>    AttributeError: 'NoneType' object has no attribute 'read'  
  </code></pre>
  <p>Any help is welcome, thanks!</p>