Commit 20f23ae0 authored by Nicolas Delaby's avatar Nicolas Delaby

Return raw data if explicitely asked for


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44871 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ec322905
...@@ -269,6 +269,9 @@ class Image(TextConvertableMixin, File, OFSImage): ...@@ -269,6 +269,9 @@ class Image(TextConvertableMixin, File, OFSImage):
data = aq_base(data) data = aq_base(data)
self.setConversion(data, mime=mime_type, format=format) self.setConversion(data, mime=mime_type, format=format)
return mime_type, data return mime_type, data
if not (format and kw):
# User asked for original content
return self.getContentType(), self.getData()
image_size = self.getSizeFromImageDisplay(kw.get('display')) image_size = self.getSizeFromImageDisplay(kw.get('display'))
# store all keys usefull to convert or resize an image # store all keys usefull to convert or resize an image
# 'display' parameter can be discarded # 'display' parameter can be discarded
......
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