I have a small project which has to response some files. I know that using nginx
will be better decision but that files a really small.
Part of my program:
I had this problem before, I tried many of solutions mentioned here and finally I could fix the problem by writing the correct mimetype of the file
here my example:
@app.route('/download_report')
def download_summary():
return send_file('Report.csv', mimetype='application/x-csv', attachment_filename='summary_report.csv', as_attachment=True)