6 Oct
2002
6 Oct
'02
5:31 a.m.
Hi! I have some big files (about 500 MB) in the filesystem on the server and want to make them downloadable. I could do something like this, but it loads the file into memory: <code> def manage_download(self, REQUEST): myfile = open('myfile.bin', 'rb') filestring = myfile.read() myfile.close() REQUEST.RESPONSE.setHeader('Content-type', 'application/data') REQUEST.RESPONSE.setHeader('Content-Disposition', 'inline;filename=myfile.bin') return filestring </code> Is there a way to just pass the file through? Without loading it in a string or in the ZODB? Any hints are welcome. TIA, Yuppie