From 5357649b5bbd1710876b7f03ac23470c84f31fc3 Mon Sep 17 00:00:00 2001 From: Fabien Morin <fabien@nexedi.com> Date: Thu, 28 Jan 2010 16:21:26 +0000 Subject: [PATCH] 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 --- product/ERP5Form/ImageField.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/product/ERP5Form/ImageField.py b/product/ERP5Form/ImageField.py index 545eee42f4..dcfbbbdb81 100644 --- a/product/ERP5Form/ImageField.py +++ b/product/ERP5Form/ImageField.py @@ -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) -- 2.30.9