Skip to Content
Menu
This question has been flagged
3 Replies
5197 Zobrazenia

att_file = fields.Binary(string='Attach File')

name="att_file" widget="binary" options="{'accept': '.pdf, image/*'}" filename="name" string="Attachment"/>

This is my Html code is any one can help me to specify the file input type.


Avatar
Zrušiť
Best Answer

Hi,

Along with the field definition you can specify as follows:

options="{'accepted_file_extensions': '.pdf'}"


Sample: 

field name="worksheet_document" string="Document" options="{'accepted_file_extensions': '.pdf'}"


Thanks

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
2
sep 23
9941
1
feb 22
6982
2
júl 19
3013
0
nov 18
2933
4
sep 18
4926