Ok you need to fix 2 things in your app, one of them shows I was right 
about the table definition problem:

First, in create_image() change:

image = IMG(_src = URL('default', 'download', record.user_image),  _style = 
'height:200px;width:200px')

Into this:

image = IMG(_src = URL('default', 'download', args=record.user_image), 
 _style = 'height:200px;width:200px')


Then, you also need to define the table in your models or in the download 
controller, for it to work correctly. One way to do it is to call your 
User_Image(db = db, auth_signature = auth.signature) somewhere in your 
models or even in your download controller.

def download():
    from user_custom import User_Image
    image_inst = User_Image(db = db, auth_signature = auth.signature)    
    return response.download(request,db)


Doing both these changes solved the problem.

By the way, I wouldn't have the User_Image class at all, since it's only 
defining the table, it serves no purpose, you may as well just define the 
table in your models and be done with it (which would result in simpler 
code all around).

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to