You can tell if the function is being called with a form submission by checking for request.vars:
if request.vars: print 'this is a form submission' On Saturday, November 19, 2011 12:06:40 PM UTC-5, miroslavgojic wrote: > > The error is caused when file is not selected. > By default on first run form is empty (file is not selected), and form > must wait for selecting and submitting. > > How access to file before calling form? What that mean? > > Miroslav > > On Nov 19, 5:52 pm, Anthony <abas...@gmail.com> wrote: > > 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 > >