version 1.43, 2005/10/05 11:21:56
|
version 1.48, 2005/10/19 11:56:52
|
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()) |
Line 523 class versionedFileObject(File):
|
Line 523 class versionedFileObject(File):
|
|
|
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()) |
|
#txt=urllib.urlopen(self.absolute_url()).read() |
|
#self.REQUEST.RESPONSE.write(txt) |
|
try: |
self.REQUEST.RESPONSE.write(self.index_html()) |
self.REQUEST.RESPONSE.write(self.index_html()) |
#self.REQUEST.RESPONSE.write("bl") |
except: |
|
self.REQUEST.RESPONSE.write(self.index_html(REQUEST,RESPONSE)) |
|
|
self.REQUEST.close() |
self.REQUEST.close() |
|
|
def downloadLocked(self): |
def downloadLocked(self): |