Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
3370 Vues

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
Ignorer
Auteur Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
juil. 20
16048
2
juin 24
4674
0
janv. 21
3623
1
juil. 16
7751
2
oct. 24
3839