Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
3539 Tampilan

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
Buang
Penulis Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Agu 20
16288
2
Jul 24
4883
0
Jan 21
3792
1
Jul 16
7976
2
Okt 24
4017