Commit 5357649b authored by Fabien Morin's avatar Fabien Morin

Big images are cut into smaller chunks, so it's required to cast to str. See...

Big images are cut into smaller chunks, so it's required to cast to str. See OFS/Image -> _read_data method for more informations

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32069 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6a1dd1ac
......@@ -138,6 +138,10 @@ class ImageFieldWidget(Widget.TextWidget):
if image_data is None:
return draw_frame_node
# Big images are cut into smaller chunks, so it's required to cast to
# str. See OFS/Image -> _read_data method for more informations
image_data = str(image_data)
format = content_type.split('/')[-1]
# add the image to the odg document
picture_path = ooo_builder.addImage(image=image_data, format=format)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment