Hi guys,

I'm using
Version 2.00.0 (2012-08-07 22:45:43) dev

model
db.define_table('staff', 
    Field('user_id','reference auth_user',default=auth.user_id,writable=
False,readable=False), 
    Field('photo', 'upload', uploadfield='image_file'),
    Field('image_file', 'blob')
)

controller
def form():
    record = db(db.staff.user_id==auth.user_id).select().first()
    form = SQLFORM(db.staff,record)

    if form.process().accepted:
        response.flash = 'form accepted!'
    elif form.errors:
        response.flash = 'form has errors'

generic views are used.

When I load the page "form", the photo doesn't appear like in the 
manual http://web2py.com/books/default/chapter/29/7#SQLFORM-and-uploads
But it appears in the appadmin. Is something missing rom my code?

-- 



Reply via email to