Hi, this is how I stream the file:
def GET(self):
# assuming we have selected doc from the database
web.header("Content-Disposition", "attachment; filename=%s" % doc.filename)
web.header("Content-Type", doc.filetype)
web.header('Transfer-Encoding','chunked')
f = open(doc.filename, 'rb')
while 1:
buf = f.read(1024 * 8)
if not buf:
break
yield buf