Commit 3ea5802e 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

reviewed by Kazuhiko


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32063 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a16bcb52
No related merge requests found
......@@ -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')
......
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