Commit 6c1bdd3d authored by Rafael Monnerat's avatar Rafael Monnerat

According to portal_contributions API a file and file_name should be provided...

According to portal_contributions API a file and file_name should be provided to create a new document.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35503 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 16798edf
......@@ -401,6 +401,8 @@ class OOoDocument(PermanentURLMixIn, BaseConvertableAndFileMixin, File,
else:
temp_image = self.portal_contributions.newContent(
portal_type='Image',
file=cStringIO.StringIO(),
file_name=self.getId(),
temp_object=1)
temp_image._setData(data)
mime, data = temp_image.convert(original_format, display=display)
......
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