Commit 9be50d11 authored by Gabriel Monnerat's avatar Gabriel Monnerat

bug fix. When is a zipfile is need return the zip mimetype

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@37498 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e56ebe9c
......@@ -93,7 +93,7 @@ class UnoConverter(object):
property_list.append(property)
property = ooolib.createProperty("FilterName", filter_name)
property_list.append(property)
if destination_format == "html":
if "htm" in destination_format:
# XXX - condition to obtain a property that returns all images in png
# format
property_list.append(ooolib.createHTMLProperty())
......
......@@ -199,7 +199,9 @@ class Manager(object):
response_dict = {}
response_dict['data'] = self.convertFile(file, orig_format, format, zip)
# FIXME: Fast solution to obtain the html or pdf mimetypes
if format == "html":
if zip:
response_dict['mime'] = "application/zip"
elif format == "html":
response_dict['mime'] = "text/html"
elif format == "pdf":
response_dict['mime'] = "application/pdf"
......
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