Skip to Content
Menu
This question has been flagged
1 Odpoveď
3412 Zobrazenia

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?

Avatar
Zrušiť
Autor Best Answer

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.



Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
júl 20
16096
2
jún 24
4718
0
jan 21
3657
1
júl 16
7797
2
okt 24
3883