Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3566 Widoki

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?

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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.



Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
sie 20
16317
2
lip 24
4908
0
sty 21
3825
1
lip 16
8025
2
paź 24
4044