Ahhhhhhhh. Nirvana. Thank you. Thank you. And, thank you. I promise to try to make you fat. You'll figure out what I mean. Anyway, now, where do I go to learn how response.download and response.stream really work?
On Jan 12, 1:32 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > {{=IMG(src=URL(r=request,c='default',f='mydownload',args= > ['folder1','folder2',user_id,filename])}} > > so then > > #default controller > def mydownload(): > filename=os.path.join(request.folder,'uploads',request.args > (0),request.args(1),request.args(2)) > return response.stream(open(filename,'rb')) > > On Jan 11, 11:52 pm, weheh <richard_gor...@verizon.net> wrote: > > > > > I think I understand what you're trying to do but it's not working for > > me. Since I've already accessed the db, there's no point in > > duplicating the access in download in order to get the user_id. Why > > can't I just pass the user_id to downloads as an arg? > > > #view > > {{=IMG(src=URL(r=request,c='default',f='mydownload',args= > > ['folder1','folder2',user_id,filename])}} > > > so then > > > #default controller > > def mydownload(): > > db.table.myfile.uploadfolder=os.path.join > > (request.folder,'uploads',request.args(0),request.args(1),request.args > > (2)) > > return response.download(request,db) > > > Unfortunately, this doesn't work for me, either. No tickets are thrown > > in either case. And now, I don't even see any of the images associated > > with the currently logged in user. Hmmmm......- Hide quoted text - > > - Show quoted text -
-- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.