roger that i'll try all that and let you know what the problem was when i 
find it 

On Saturday, October 15, 2016 at 2:20:41 AM UTC-5, Jaimee S wrote:
>
> Hello all,
>
> I've been trying relentlessly to display a photo that is connected to a 
> user. I've tried the download function a thousand ways and am slowly 
> running out of Google search terms. Here is what I've tried:
>
>
> <db.py>
> auth.settings.extra_fields[auth.settings.table_user_name]=
>  [Field('picture','upload')] #success, no hiccups
> </db.py>
>
> <default.py>
> def get_file():
>  row = db(db.auth_user.id==request.args(0)).select().first()
>  return locals() #success, no hiccups
>
>  row =db(db.auth_user.id)...
>
> def download() 
>  return response.download(request,db)
> </default.py>
>
> <get_file.html>
> <img src="{{=URL('download',args=db.auth_user.picture)}}/>
> #displays broken image
>
> #other failed methods
> {{for b in row:}}<img...args=b.picture>{{pass}}
>
> {{for...args=b...}}
>
> #also used for loop to print out username. That worked, but when I tried 
> image it displayed a link. When I added img tags before the link I got a 
> broken link
>
> <h2>{{=row.picture}}</h2>
>
> <h2>{{row.picture}}</h2>
>
> <h2>{{db.auth_user.picture}}</>
> #same thing with equal sign before db
> </get_file.html>
>
> Everything has failed me or caused me a ticket thus far. I'm out of 
> creative ideas and am looking for another thousand ideas to try before I 
> have to start translating my searches to Italian and Spanish.
>
> Thanks for reading! Awaiting your response.
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to