Skip to Content
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
8080 Представления

I am trying to convert binary data to image but facing some hurdles in it . First i had learned that how i can convert binary data to image

with open("imageToSave.jpg", "wb") as imgFile:
    imgFile.write(base64.b64decode(imagestr))

After that i had found that how odoo's save image binary data in ir.attachement then i had fetched binary data

        product_image=self.env['ir.attachment']
        product_images=product_image.search([('id','in',p_ids)])
        for rec in product_images:
           print(rec.storefname)

but the binary data which i got by using above code isn't correct

84/8468aeff52f5e338dcaf9000cae16013f6ee793b

because i am not able to create correct image from it.i also had test it on multi online converts. So if anybody have idea about odoo's binary data then please help me.I will pray for your success.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
янв. 22
2340
1
мар. 20
2174
0
июл. 19
2073
2
июл. 17
10429
0
окт. 15
2928