durusmail: quixote-users: form2 and file upload (FileWidget)
widget repository for Quixote
2004-05-16
form2 and file upload (FileWidget)
2004-05-17
2004-05-17
upper size limit on POST data?
2004-05-18
2004-05-18
2004-05-18
2004-05-18
form2 and file upload (FileWidget)
Charles Brandt
2004-05-17
Does anyone have an example of uploading a file using FileWidget in form2?
My attempts have resulted in a NoneType object being in place of the forms
file entry.  I'm not sure if I'm over looking something obvious, or if this
is maybe a known issue/limitation with the new form2?  Thanks in advance!

-Charles

what I was trying:

class myForm(Form):
    def __init__(self, **kwargs):
        Form.__init__(self, **kwargs)
        self.add(FileWidget, 'file', '', title='Upload file:',
                 size=30, required=True)
        self.add_submit('go', 'Go')

class myUI:
    def _q_index(self, req):
        form = myForm()
        content = ""
        if not form.is_submitted():
            content += form.render()
        else:
            content += str(form['file'])




reply