From 6a1dd1ac3633dce53f30ab37815ae0425aa1b90d Mon Sep 17 00:00:00 2001
From: Fabien Morin <fabien@nexedi.com>
Date: Thu, 28 Jan 2010 16:20:44 +0000
Subject: [PATCH] revert r32063 as convert should return pdata anyway, the
 conversion should be done by convert caller. Reviewed by jerome and kazuhiko

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32068 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/Image.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/product/ERP5/Document/Image.py b/product/ERP5/Document/Image.py
index e6e86e1cb3..de57b1f8b7 100644
--- a/product/ERP5/Document/Image.py
+++ b/product/ERP5/Document/Image.py
@@ -348,9 +348,7 @@ class Image(File, OFSImage):
       except KeyError:
         mime, image = self._makeDisplayPhoto(**kw)
         self.setConversion(image, mime, **kw)
-      # 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 mime, image.data
     return self.getContentType(), self.getData()
 
   security.declareProtected(Permissions.View, 'getSearchableText')
-- 
2.30.9