Commit 93401a21 authored by Nicolas Delaby's avatar Nicolas Delaby

There was a confusion of meaning between compatibility API and new API of cloudooo.

filename extension != content_type


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@40591 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cccfaa28
......@@ -224,6 +224,9 @@ class Manager(object):
This is a Backwards compatibility provided for ERP5 Project, in order
to keep compatibility with OpenOffice.org Daemon.
"""
# calculate original extension required by convertFile from
# given content_type (orig_format)
original_extension = guess_extension(orig_format).strip('.')
# XXX - ugly way to remove "/" and "."
orig_format = orig_format.split('.')[-1]
orig_format = orig_format.split('/')[-1]
......@@ -240,7 +243,7 @@ class Manager(object):
"xhtml"):
extension = "htm"
response_dict['data'] = self.convertFile(data,
orig_format,
original_extension,
extension,
zip)
# FIXME: Fast solution to obtain the html or pdf mimetypes
......
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