cgi FieldStorage strangeness

Tim Roberts timr at probo.com
Wed Mar 5 02:55:18 EST 2003


m at idelix.com (Mark Tigges) wrote:
>
>I'm at a loss here, therefore the post.  
>
>I'm writing a CGI that uploads a file from the client using method
>POST in an html form submit.  Unfortunately I can't seem to get the
>form fields.  When the page loads up, using FieldStorage.print_form it
>says  "No form fields".

Uploading a file requires a different data type from standard form
processing.  You need to use the enctype field in the <form> header:

<form method="POST" action="/cgi-bin/xxx.py" enctype="multipart/form-data">
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.




More information about the Python-list mailing list