From 3ea5802e27d351eb8a9a2fa59568602cb842ee34 Mon Sep 17 00:00:00 2001 From: Fabien Morin <fabien@nexedi.com> Date: Thu, 28 Jan 2010 15:00:46 +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 reviewed by Kazuhiko git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32063 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/Image.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/product/ERP5/Document/Image.py b/product/ERP5/Document/Image.py index de57b1f8b7..e6e86e1cb3 100644 --- a/product/ERP5/Document/Image.py +++ b/product/ERP5/Document/Image.py @@ -348,7 +348,9 @@ class Image(File, OFSImage): except KeyError: mime, image = self._makeDisplayPhoto(**kw) self.setConversion(image, mime, **kw) - return mime, image.data + # Big images are cut into smaller chunks, so it's required to cast to + # str. See OFS/Image -> _read_data method for more informations + return mime, str(image.data) return self.getContentType(), self.getData() security.declareProtected(Permissions.View, 'getSearchableText') -- 2.30.9