--- versionedFile/versionedFile.py 2005/03/21 08:12:46 1.32 +++ versionedFile/versionedFile.py 2005/03/21 14:54:50 1.33 @@ -290,9 +290,14 @@ class versionedFileObject(File): def download(self): """download and lock""" - + self.REQUEST.RESPONSE.setHeader("Content-Disposition","""attachement; filename=%s"""%self.getId()) + self.REQUEST.RESPONSE.setHeader("Content-Type","application/octet-stream") + self.content_type="application/octet-stream" - self.REQUEST.RESPONSE.redirect(self.absolute_url()) + #self.REQUEST.RESPONSE.redirect(self.absolute_url()) + self.REQUEST.RESPONSE.write(self.index_html()) + #self.REQUEST.RESPONSE.write("bl") + self.REQUEST.close() def downloadLocked(self): """download and lock""" @@ -532,8 +537,17 @@ class versionedFile(Folder): def download(self): """download and lock""" - self.getLastVersion().content_type="application/octet-stream" - self.REQUEST.RESPONSE.redirect(self.REQUEST['URL1']+'/'+self.getId()+'/'+self.getLastVersion().getId()) + + self.REQUEST.RESPONSE.setHeader("Content-Disposition","""attachement; filename=%s"""%self.getLastVersion().getId()) + self.REQUEST.RESPONSE.setHeader("Content-Type","application/octet-stream") + + self.content_type="application/octet-stream" + #self.REQUEST.RESPONSE.write("bl") + self.REQUEST.RESPONSE.write(self.getLastVersion().index_html()) + self.REQUEST.close() + + #self.getLastVersion().content_type="application/octet-stream" + #self.REQUEST.RESPONSE.redirect(self.REQUEST['URL1']+'/'+self.getId()+'/'+self.getLastVersion().getId()) def downloadLocked(self): """download and lock"""