[Erp5-report] r32063 fabien - /erp5/trunk/products/ERP5/Document/Image.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jan 28 16:00:50 CET 2010


Author: fabien
Date: Thu Jan 28 16:00:46 2010
New Revision: 32063

URL: http://svn.erp5.org?rev=32063&view=rev
Log:
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

Modified:
    erp5/trunk/products/ERP5/Document/Image.py

Modified: erp5/trunk/products/ERP5/Document/Image.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Image.py?rev=32063&r1=32062&r2=32063&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Image.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Image.py [utf8] Thu Jan 28 16:00:46 2010
@@ -348,7 +348,9 @@
       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')




More information about the Erp5-report mailing list