Thanks Alan!

On Wednesday, July 17, 2013 10:05:14 PM UTC+2, Alan Etkin wrote:
>
>
>> def download_file():
>> file = db(db.files.user_id == int(request.args(0))).select()
>> for f in file:
>> name = f.name
>>  return response.download(name,db)
>>
>> I think that the call to download should be response.download(request, 
> db) and you could customize the request args so the method gets the file 
> you want:
>
> file = db(...).select().first().name
> request.args[-1] = name
> return response.download(request, db)
>
> Edit:
>
> request.args[-1] = name
>
> should be
>
> request.args[-1] = file
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to