Skip to Content
Menu
This question has been flagged
1 Reply
8181 Views

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
Discard
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
Discard
Related Posts Replies Views Activity
1
Jun 21
6719
0
Jan 21
804
2
Apr 20
9845
0
May 24
1604
2
May 24
3223