yes, i know of the security holes :)
With your idea in mind, i googled and found cherrypy's "serve_file"
I think that will do it.
Thanks.
On 1 Feb., 18:21, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> noodyn schrieb:
>
> > Hi,
> > i want to add a possibility for downloading to my project.
>
> > This is the plan:
> > I have several files saved on my computer. I'm starting a request and
> > get a dict of files including their path on my computer, e.g. "/home/
> > bla/foo.jpg" This is what runs :)
>
> > BUT i want to link the file via Turbogears/Cherrypy to be able to
> > download it from a remote pc. if i link it with ${x.filename} i get a
> > link like "http://localhost:8080/home/bla/foo.jpg", which isn't
> > working.
>
> > Any ideas?
>
> Why don't you generate links like
>
> http://localhost:8080/downloader?path=/home/bla/foo.jpg
>
> Then have a downloader-method exposed in root that will open the file
> given by path and return it's contents.
>
> BTW, you are awary of the massive security holes you're creating with this?
>
> Diez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---