On 12-09-11 20:00, Viktor Nagy wrote:
Hi,
I'm building a wrapper-addon for hylafax
(lp:~toolpart/openobject-addons/sendfax), and would need a simple way
to get back ir.attachment objects as file-like objects (actually, I
just need a read method.
Could someone post me a way to do it, please?
Hi Victor,
"import base64" at the top of your script and then
file_data = base64.decodestring(attachment_id.datas)
Cheers,
Stefan.
--
Therp - Maatwerk in open ontwikkeling
Stefan Rijnhart - Ontwerp en implementatie
mail: [email protected]
tel: +31 (0) 614478606
web: http://therp.nl
_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-community
More help : https://help.launchpad.net/ListHelp