Commit 95597292 authored by 's avatar

Protected update_data

parent 131a4ee2
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""Image object""" """Image object"""
__version__='$Revision: 1.118 $'[11:-2] __version__='$Revision: 1.119 $'[11:-2]
import Globals, string, struct, content_types import Globals, string, struct, content_types
from OFS.content_types import guess_content_type from OFS.content_types import guess_content_type
...@@ -252,6 +252,8 @@ class File(Persistent, Implicit, PropertyManager, ...@@ -252,6 +252,8 @@ class File(Persistent, Implicit, PropertyManager,
""" """
raise 'Redirect', URL1 raise 'Redirect', URL1
# private
update_data__roles__=()
def update_data(self, data, content_type=None, size=None): def update_data(self, data, content_type=None, size=None):
if content_type is not None: self.content_type=content_type if content_type is not None: self.content_type=content_type
if size is None: size=len(data) if size is None: size=len(data)
...@@ -491,6 +493,8 @@ class Image(File): ...@@ -491,6 +493,8 @@ class Image(File):
kind='image') kind='image')
manage=manage_main=manage_editForm manage=manage_main=manage_editForm
# private
update_data__roles__=()
def update_data(self, data, content_type=None, size=None): def update_data(self, data, content_type=None, size=None):
if size is None: size=len(data) if size is None: size=len(data)
......
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