Closed tomgross closed 1 year ago
The binary contenttypes (file, image) should provide the Python file API (https://docs.python.org/2/library/stdtypes.html#file-objects) to make it easier to work with them.
Instead of accessing the raw data with
data = obj.file.data it should be data = obj.read()
data = obj.file.data
data = obj.read()
5.1
I close the issue, because it addresses a Plone version that is no longer supported. If you think this is wrong please reopen the issue and assign a matching milestone.
BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)
The binary contenttypes (file, image) should provide the Python file API (https://docs.python.org/2/library/stdtypes.html#file-objects) to make it easier to work with them.
Instead of accessing the raw data with
data = obj.file.data
it should bedata = obj.read()
What version of Plone/ Addons I am using:
5.1