[mod_python] How to find a filename

Jorey Bump list at joreybump.com
Sat Jan 20 07:43:00 EST 2007


export at hope.cz wrote:
> I have a form through which users upload a file.
> 
> <form method="post" action="test/mptest.py" enctype="multipart/form-data">
>   <p><input type="file" name="Picture"> </p>
> </form>
> </body>
> 
> Is it possible to find out the name of a file the user is being uploaded?

If you are using Publisher, it will be available as:

  req.form['Picture'].filename



More information about the Mod_python mailing list