Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3374 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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.



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 20
16048
2
thg 6 24
4674
0
thg 1 21
3623
1
thg 7 16
7751
2
thg 10 24
3839