I tried simplifying the situation, by forgetting about the file upload
for now, and just posting a text string

db.define_table( 'names',
    Field('name', 'string' ))

def upload2():

    form=FORM(TABLE(TR("Your
name:",INPUT(_type="text",_name="name",requires=IS_NOT_EMPTY())),
                     TR("",INPUT(_type="submit",_value="SUBMIT"))))
    if form.accepts(request.vars,session):
        response.flash="form accepted"
        db.names.insert(name=form.vars.name)
    elif form.errors:
        response.flash="form is invalid"
    else:
        response.flash="please fill the form"
    return dict(form=form,vars=form.vars)

Which suggests the curl command should be

curl ^
 -F name=atest ^
 -F _formkey=fb7156e2-f6ca-43e1-a4e1-993ca4c24c26 ^
 -F _formname=default ^
 http://127.0.0.1:8000/filer/default/upload2/2

But it doesn't work!

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to