Awesome- worked- Thanks!

On Dec 22, 1:36 pm, Anthony <abasta...@gmail.com> wrote:
> In your download() function, I suppose you could retrieve the stored
> filename based on the record ID, and then do:
>
> request.args.append(the_filename)
>
> before calling response.download().
>
> Note, using this method, someone could download all of your images by
> simply incrementing the record ID in the URL (that wouldn't be possible
> with the usual method, because each filename includes a uuid and the
> encoded original filename).
>
> Anthony
>
>
>
>
>
>
>
> On Thursday, December 22, 2011 1:02:45 PM UTC-5, Yarin wrote:
>
> > I want to be able to create pretty links to images in the uploads
> > folder that are based on the image record ID in the DB.
>
> > For example:
> > [app]/images/download/[image_id]
>
> > However, I can't figure out how to create a function that would
> > trigger response.download(_), as that function requires a request
> > object with a filename arg.
>
> > Is there anyway I can read an image record ID, retrieve the filename
> > from the db, and use that to trigger response.download()?

Reply via email to