Diff for /versionedFile/versionedFile.py between versions 1.43 and 1.49

version 1.43, 2005/10/05 11:21:56 version 1.49, 2005/10/19 13:41:59
Line 17  from threading import Thread Line 17  from threading import Thread
 import shutil  import shutil
 import tempfile  import tempfile
 import os.path  import os.path
   import urllib
   
 import time  import time
 try:  try:
Line 515  class versionedFileObject(File): Line 515  class versionedFileObject(File):
   
           
   
     def download(self):      def download(self,REQUEST=None,RESPONSE=None):
         """download and lock"""          """download and lock"""
                   
         self.REQUEST.RESPONSE.setHeader("Content-Disposition","""attachement; filename=%s"""%self.getId())          self.REQUEST.RESPONSE.setHeader("Content-Disposition","""attachement; filename=%s"""%self.getId())
     self.REQUEST.RESPONSE.setHeader("Content-Type","application/octet-stream")      self.REQUEST.RESPONSE.setHeader("Content-Type","application/octet-stream")
       #try:
       #   txt=self.index_html()
       #except:
       #   txt=self.index_html(REQUEST,RESPONSE)
       #
       #self.REQUEST.RESPONSE.setHeader("Content-Length","str(len(txt)+1000)")
               
         self.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())          #txt=urllib.urlopen(self.absolute_url()).read()
         #self.REQUEST.RESPONSE.write("bl")          #self.REQUEST.RESPONSE.write(txt)
         self.REQUEST.close()      
   
           #self.REQUEST.close()
           
     def downloadLocked(self):      def downloadLocked(self):
         """download and lock"""          """download and lock"""
Line 830  class versionedFile(Folder): Line 838  class versionedFile(Folder):
         self.REQUEST.RESPONSE.setHeader("Content-Disposition","""attachement; filename=%s"""%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.REQUEST.RESPONSE.setHeader("Content-Type","application/octet-stream")
               
       #try:   
       #   txt=self.getLastVersion.index_html()
       #except:
       #   txt=self.getLastVersion.index_html(REQUEST,RESPONSE)
   
       #self.REQUEST.RESPONSE.setHeader("Content-Length","str(len(txt)+1000)")
           
         self.content_type="application/octet-stream"          self.content_type="application/octet-stream"
         #self.REQUEST.RESPONSE.write("bl")          #self.REQUEST.RESPONSE.write("bl")
         self.REQUEST.RESPONSE.write(self.getLastVersion().index_html())          #self.REQUEST.RESPONSE.write(txt)
         self.REQUEST.close()          #self.REQUEST.close()
   
         #self.getLastVersion().content_type="application/octet-stream"          #self.getLastVersion().content_type="application/octet-stream"
         #self.REQUEST.RESPONSE.redirect(self.REQUEST['URL1']+'/'+self.getId()+'/'+self.getLastVersion().getId())          self.REQUEST.RESPONSE.redirect(self.REQUEST['URL1']+'/'+self.getId()+'/'+self.getLastVersion().getId())
           
     def downloadLocked(self):      def downloadLocked(self):
         """download and lock"""          """download and lock"""

Removed from v.1.43  
changed lines
  Added in v.1.49


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>