Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1098 Zobrazení

I'm trying to upload an image to odoo via Php, but it doesn't work


My code:


/*getting image from bytea column in postgres sql*/

$imageOdoo = (String)base64_encode($line["data"]);


/*trying to upload to Odoo*/

$models->execute_kw($db, $uid, $password, 'product.template', 'write', array(array(2637), array('image_1920'=>$imageOdoo)));


The error i'm always getting is:

[_response] => faultCode 2 faultString This file could not be decoded as an image file. [_request]

Avatar
Zrušit