Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
8488 Prikazi

Hi every one,

I want to show my attachment(binary) field data on webpage as pdf file kindly guid.

Thank you so much in advance

Avatar
Opusti
Best Answer

Hi,

You can use the following code, adapt it as you need:

<a t-attf-href="/web/content/#{attachment.id}?download=true" target="_blank">
    <div class='oe_attachment_embedded o_image' t-att-title="attachment.name" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/100x80"/>
    <div class='oe_attachment_name'><t t-raw='attachment.name' /></div>
</a>

Best regards!

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
jun. 21
6965
0
jan. 21
804
2
apr. 20
10320
0
maj 24
1868
2
maj 24
3652