title: Flask/Werkzeug how to attach HTTP content-length header to file download
body: <p>I am using Flask (based on Werkzeug) which uses Python.</p>
  
  <p>The user can download a file, I'm using the <a href="http://flask.pocoo.org/docs/api/?highlight=send_from_directory#flask.send_from_directory" rel="noreferrer"><code>send_from_directory</code>-function</a>.</p>
  
  <p>However when actually downloading the file, the HTTP header <code>content-length</code> is not set. So the user has no idea how big the file being downloaded is.</p>
  
  <p>I can use <code>os.path.getsize(FILE_LOCATION)</code> in Python to get the file size (in bytes), but cannot find a way to set the <code>content-length</code> header in Flask.</p>
  
  <p>Any ideas?</p>