Charles,
Try this:
form = myForm(enctype="multipart/form-data")
instead of this:
form = myForm()
Jason
> -----Original Message-----
> From: quixote-users-bounces+jsibre=chironsys.com@mems-exchange.org
> [mailto:quixote-users-bounces+jsibre=chironsys.com@mems-exchange.org]On
> Behalf Of Charles Brandt
> Sent: Monday, May 17, 2004 3:45 AM
> To: quixote-users@mems-exchange.org
> Subject: [Quixote-users] form2 and file upload (FileWidget)
>
>
> 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'])
>
>
>
> _______________________________________________
> Quixote-users mailing list
> Quixote-users@mems-exchange.org
> http://mail.mems-exchange.org/mailman/listinfo/quixote-users
>