plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
246 stars 186 forks source link

Implement Python file methods for binary contenttypes (file, image) #2226

Closed tomgross closed 1 year ago

tomgross commented 6 years ago

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 be data = obj.read()

What version of Plone/ Addons I am using:

5.1

jensens commented 1 year ago

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.