Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
3376 Переглядів

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.



Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
лип. 20
16048
2
черв. 24
4674
0
січ. 21
3623
1
лип. 16
7752
2
жовт. 24
3839