Back to index

plone3  3.1.7
archive.py
Go to the documentation of this file.
00001 from Products.Five import BrowserView
00002 from Products.ATContentTypes.interface.archive import IArchiver
00003 
00004 class ArchiveView(BrowserView):
00005     """
00006     """
00007     def getZipFile(self,**kwargs):
00008         """
00009         """
00010         adapted = IArchiver(self.context)
00011         self.request.RESPONSE.setHeader('Content-Type','application/zip')
00012         self.request.RESPONSE.addHeader("Content-Disposition","filename=%s.zip" % self.context.getId())
00013         self.request.RESPONSE.write(adapted.getRawArchive(**kwargs))
00014