Is this bug or feature?

def myaction():
    form = SQLFORM.factory(Field("myupload", "upload"))
    if form.process().accepted:
        print form.vars
    return dict(form=form)

On submission it produces

Traceback 

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.

Traceback (most recent call last):
  File "/home/alumno/web2py-git/gluon/restricted.py", line 217, in restricted
    exec ccode in environment
  File 
"/home/alumno/web2py-git/applications/multiupload/controllers/default.py" 
<http://localhost:8000/admin/default/edit/multiupload/controllers/default.py>, 
line 102, in <module>
  File "/home/alumno/web2py-git/gluon/globals.py", line 378, in <lambda>
    self._caller = lambda f: f()
  File 
"/home/alumno/web2py-git/applications/multiupload/controllers/default.py" 
<http://localhost:8000/admin/default/edit/multiupload/controllers/default.py>, 
line 14, in myaction
    if form.process().accepted:
  File "/home/alumno/web2py-git/gluon/html.py", line 2209, in process
    self.validate(**kwargs)
  File "/home/alumno/web2py-git/gluon/html.py", line 2148, in validate
    if self.accepts(**kwargs):
  File "/home/alumno/web2py-git/gluon/sqlhtml.py", line 1455, in accepts
    field.uploadfolder)
  File "/home/alumno/web2py-git/gluon/dal.py", line 9511, in store
    "you must specify a Field(...,uploadfolder=...)")
RuntimeError: you must specify a Field(...,uploadfolder=...)


Version 2.6.0-development+timestamp.2013.09.02.20.41.19

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to