Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3258 มุมมอง

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
15866
2
มิ.ย. 24
4556
0
ม.ค. 21
3525
1
ก.ค. 16
7667
2
ต.ค. 24
3683