Commit 977db6eb authored by Bartek Górny's avatar Bartek Górny

added index_html for standardisation

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12206 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4c7a2ee8
......@@ -66,13 +66,14 @@ class PDFDocument(File, ConversionCacheMixin):
)
def getTargetFile(self,format):
'''
we need to make our own, because Photo's methods are not
sufficient (we have to zip etc)
'''
if not self.hasConversion(format = format):
def index_html(self, REQUEST, RESPONSE, format, force=0):
"""
Returns data in the appropriate format
"""
mime = 'image/'+format.lower()
if force or not self.hasConversion(format = format):
self.setConversion(self._makeFile(format), 'application/zip', format=format)
RESPONSE.setHeader('Content-Type', 'application/zip')
return self.getConversion(format = format)
def _makeFile(self,format):
......
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