old_contents: """
  tiny_example.py
  :copyright: (c) 2015 by C. W.
  :license: GPL v3 or BSD
  """
  from flask import Flask, request, jsonify
  from flask.ext import excel
  
  app=Flask(__name__)
  
  @app.route("/upload", methods=['GET', 'POST'])
  def upload_file():
      if request.method == 'POST':
          return jsonify({"result": request.get_array('file')})
      return '''
      <!doctype html>
      <title>Upload an excel file</title>
      <h1>Excel file upload (csv, tsv, csvz, tsvz only)</h1>
      <form action="" method=post enctype=multipart/form-data><p>
      <input type=file name=file><input type=submit value=Upload>
      </form>
      '''
  
  @app.route("/download", methods=['GET'])
  def download_file():
      return excel.make_response_from_array([[1,2], [3, 4]], "csv")
  
  # insert database related code here
  
  if __name__ == "__main__":
      app.run()
  
new_contents: """
  tiny_example.py
  :copyright: (c) 2015 by C. W.
  :license: GPL v3 or BSD
  """
  from flask import Flask, request, jsonify
  from flask.ext import excel
  
  app=Flask(__name__)
  
  @app.route("/upload", methods=['GET', 'POST'])
  def upload_file():
      if request.method == 'POST':
          return jsonify({"result": request.get_array(field_name='file')})
      return '''
      <!doctype html>
      <title>Upload an excel file</title>
      <h1>Excel file upload (csv, tsv, csvz, tsvz only)</h1>
      <form action="" method=post enctype=multipart/form-data><p>
      <input type=file name=file><input type=submit value=Upload>
      </form>
      '''
  
  @app.route("/download", methods=['GET'])
  def download_file():
      return excel.make_response_from_array([[1,2], [3, 4]], "csv")
  
  # insert database related code here
  
  if __name__ == "__main__":
      app.run()
  
subject: Fix #1: where field_name should have been mentioned