You might need to access the file before calling form.accepts (first you'll have to check that form.vars.myfile exists). You can also access it via request.vars.myfile (which won't change, even after form.accepts).
Anthony On Saturday, November 19, 2011 11:41:02 AM UTC-5, miroslavgojic wrote: > > > No need for 'form_data'. When you upload the file, the field values are > > stored in request.vars and then transferred into form.vars. The file > upload > > will be in form.vars.myfile, which will already be a cgi.FieldStorage() > > object. So, form.vars.myfile.file will be the open file object, and > > form.vars.myfile.filename will be the original name of the uploaded file. > > I have error in this > > form.vars.myfile.filename > <type 'exceptions.AttributeError'>('str' object has no attribute > 'filename') > > form.vars.myfile.file > <type 'exceptions.AttributeError'>('str' object has no attribute > 'file') > > Miroslav > >