[Erp5-report] r40591 nicolas - /erp5/trunk/utils/cloudooo/cloudooo/manager.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Nov 24 14:12:56 CET 2010


Author: nicolas
Date: Wed Nov 24 14:12:55 2010
New Revision: 40591

URL: http://svn.erp5.org?rev=40591&view=rev
Log:
There was a confusion of meaning between compatibility API and new API of cloudooo.
filename extension != content_type

Modified:
    erp5/trunk/utils/cloudooo/cloudooo/manager.py

Modified: erp5/trunk/utils/cloudooo/cloudooo/manager.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/manager.py?rev=40591&r1=40590&r2=40591&view=diff
==============================================================================
--- erp5/trunk/utils/cloudooo/cloudooo/manager.py [utf8] (original)
+++ erp5/trunk/utils/cloudooo/cloudooo/manager.py [utf8] Wed Nov 24 14:12:55 2010
@@ -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




More information about the Erp5-report mailing list