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

Hi All,

I have a binary field in a wizard, and I am trying to get the name of file attached in button action of that wizard.

I know it is possible in website.

Any Hints.?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Try this,

In Model,

file = fields.Binary("Attachment")

file_name = fields.Char("File Name")

In View,

<field name="file" filename="file_name"/>

<field name="file_name" invisible="1"/>

If you try this, binary field will show the file name.

อวตาร
ละทิ้ง
ผู้เขียน

Perfect, Accepting as answer.

Could you please tell me any way to get the path of the attached file.?

ผู้เขียน

Yes, Got it

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ต.ค. 23
1598
4
ต.ค. 18
8353
3
มิ.ย. 18
6907
1
ธ.ค. 19
3499
0
ต.ค. 19
2829