diff --git a/app.py b/app.py index e82314c..dac8883 100644 --- a/app.py +++ b/app.py @@ -93,6 +93,10 @@ def upload_csv(): return "File uploaded successfully", 200 +@app.route('/download_sample_csv') +def download_sample_csv(): + return send_file('resource/sample.csv', as_attachment=True) + if __name__ == '__main__': # 當在生產環境部署時,不建議使用 debug=True # 可以指定 host='0.0.0.0' 讓外部可訪問 (在防火牆允許的情況下) diff --git a/templates/index.html b/templates/index.html index 9901aa7..1cbe119 100644 --- a/templates/index.html +++ b/templates/index.html @@ -15,6 +15,9 @@
+