title: Flask send_file() returning correct .xlsx data but incorrect filename
body: <p>I'm using Python 2.7 + flask in a Google App Engine standard instance to get .xlsx files from a bucket. When I hit my download route it returns the correct data but the file name is just simply "download" and the file is not recognized as a .xlsx file. I <em>can</em> open the file in Excel and the data does show correctly, however.</p>
  
  <p>I've tried writing the data to a io.StringIO and then calling send_file with that data structure but it gave me the same problems as before.</p>
  
  <p>This is my route.</p>
  
  <pre><code>@app.route('/download', methods=['GET'])
  def download():
  
      run_id = request.args.get('run_id')
      fp = BucketHelper().get_report_fp(run_id)
      send_file(fp,
               as_attachment=True,
               mimetype='application/vnd.ms-excel',
               attachment_filename="test.xlsx")
  </code></pre>
  
  <p>This is the function which fetches the cloudstorage.storage_api.ReadBuffer object.</p>
  
  <pre><code>import cloudstorage
  from google.appengine.api import app_identity
  
  class BucketHelper:
      def __init__(self):
          self.bucket_path = '/my-bucket/path'
  
      def get_report_fp(self, run_id):
          filename = "{}/my_report_{}.xlsx".format(self.bucket_path, run_id)
          return cloudstorage.open(filename, mode='rb')
  </code></pre>
  
  <p>Instead of the file being named "test.xlsx" the file is named "download" and isn't recognized as an Excel file.</p>
  
  <p>Any help is appreciated.</p>