Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3651 Visualizzazioni

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
Abbandona
Autore Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
lug 20
16404
2
giu 24
5010
0
gen 21
3904
1
lug 16
8164
2
ott 24
4124