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

Hello,

I've one page which accept one input as file, like uploading file.

I'm not sure additional security has been added with latest HTML5 or javascript v11, but the same logic has been worked fine with v10.

When I try to read the value of field which is input type file. It's gives me wrong with something like,

C:/Fakepath/<myuploadedfile>

Which is wrong because of that I'm not able to read the file content and cannot store inside the database

I've done some research and found out that if I do store the controller name which uploads the files inside trusted list then it will not give you wrong path.

So, Is that right method? or something else need to be done to avoid this problem?

Thanks in advance.

Best Regards,

Anil Kesariya

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

Useful Answers and accepted.

https://www.odoo.com/forum/help-1/question/add-attachement-from-website-118903

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 10 24
3737
2
thg 6 24
4620
1
thg 1 21
3289
5
thg 7 23
18124
0
thg 6 23
2855