跳至內容
選單
此問題已被標幟
1 回覆
3261 瀏覽次數

I created a page on the website in which the user uploads an excel file (using form input type = "file") and I process it in the controller. but where is the path of the uploaded file? Is it saved in the database? is the file deleted after it is uploaded?

頭像
捨棄
作者 最佳答案

Figured it out myself:

Uploading a file using HTML form creates a werkzeug.FileStorage object and it won't save in a location. You can save it using file.save(dst='//path') in the controller after reading the file.



頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
7月 20
15876
2
6月 24
4565
0
1月 21
3529
1
7月 16
7669
2
10月 24
3686