Google for ExtFile. -- Andy McKay www.agmweb.ca ----- Original Message ----- From: "Yuppie" <schubbe@web.de> To: <zope@zope.org> Sent: Saturday, October 05, 2002 10:31 PM Subject: [Zope] how to download big files using zope?
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
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )