[Zope] download a file in a specific folder in the filesystem
Jonathan
dev101 at magma.ca
Thu Aug 24 11:58:48 EDT 2006
----- Original Message -----
From: "Alan" <alanwilter at gmail.com>
To: <zope at zope.org>
Sent: Thursday, August 24, 2006 11:52 AM
Subject: Re: Re: [Zope] download a file in a specific folder in the
filesystem
> Hi! Thanks for your replies.
>
> But for what I want LocalFS or ExtFile sounds too much, specially
> because I just need to download. Either, I did not realise yet well
> what Richard purposed... However, I tried that:
>
> with a external method
> fname = os.path.join(jobdir,'results.zip')
> file = open(fname,'rb').read()
> return file
>
> but instead of having the file downloaded, it is printed in my
> browser, as if it was a ascii file. I guess I need to add a mime type
> property here, but I am running out of ideas.
Try googling:
response.setheader content-type
response.setheader content-disposition
Jonathan
More information about the Zope
mailing list