跳至内容
菜单
此问题已终结
1 回复
3292 查看

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
15935
2
6月 24
4621
0
1月 21
3547
1
7月 16
7697
2
10月 24
3738