Flask - temp CSV to be read by D3 empty Flask - temp CSV to be read by D3 empty flask flask

Flask - temp CSV to be read by D3 empty


You may need to specify as_attachment=true in send_file:

return send_file(buffer, mimetype='text/csv', as_attachment=True)


Set the Content-Disposition to tell the browser to download the file.

resp = flask.make_response(df.to_csv())resp.headers["Content-Disposition"] = "attachment; filename=export.csv"resp.headers["Content-Type"] = "text/csv"return resp