def view(self, REQUEST, RESPONSE): """ """ RESPONSE.setHeader('Content-Type', self.getContentType()) RESPONSE.setHeader('Content-Length', self.size) RESPONSE.setHeader('Pragma', 'public') RESPONSE.setHeader('Cache-Control', 'max-age=0') return publication_item.index_html(self, REQUEST, RESPONSE)
def download(self, REQUEST, RESPONSE): """ """ RESPONSE.setHeader('Content-Type', self.getContentType()) RESPONSE.setHeader('Content-Length', self.size) filename = self.utToUtf8(self.downloadfilename()) filename = self.utCleanupId(filename) RESPONSE.setHeader('Content-Disposition', 'attachment;filename=' + filename) RESPONSE.setHeader('Pragma', 'public') RESPONSE.setHeader('Cache-Control', 'max-age=0') return publication_item.index_html(self, REQUEST, RESPONSE)