On Monday, June 15, 2015 at 7:57:14 AM UTC-4, Meghana Sanagaram wrote:
>
> Hi all,
>
> I'm trying to display an image stored in the database table.
> Here's the table:
>
> db.define_table('menu',
>    Field('image','upload'),
>    format = '%(title)s')
>
> I used the below html code to render the image:
>
> <img src="{{=URL(f='download', args=i.image)}}" width="110" height="110" 
> alt="{{=i.description}}"/>
>

Is the above code served by an action in the default.py controller? Your 
URL() function call does not include the controller name so will default to 
the controller of the current action. If that is not the same controller 
where you have the "download" function, then this won't work.

Anthony 

-- 
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