You are telling me that sqlform.factory is not good for editing records with uploaded files because the link does not show up in the view?
I kill myself. :) 2013/1/24 Anthony <[email protected]> > form=SQLFORM.factory(db.**trabalhador,db.t_docs, > > submit_button="Gravar", >> fields=['nome','bi','ncart','**ncartval','apt_medica','apt_** >> medicaval','val_formacao','f_**doc'], >> table_name='trabalhador', >> upload=URL('default', 'download'), >> uploadfolder=os.path.join(**request.folder,'uploads') >> ) >> > > Note, uploadfolder is an argument of Field(), not of SQLFORM() or > SQLFORM.factory(). > > for field in row: >> >> if field in db.trabalhador.fields: >> print "setting -",row[field] ," on ",field >> form.vars[field]=row[field] >> > > When you specify the upload argument to SQLFORM, it creates the link to > the file in the edit form when the form is created (i.e., in > SQLFORM.__init__()). Setting the value of form.vars[your_upload_field] > after the form has been created will not result in that link being added to > the form. > > Anthony > > -- > > > > --

