Thank you for your replies.
To let you know what you already know, i am re-writing server side
program to use mod_wsgi instead of mod_python. There are no more
mod_python in my code.
Everything works perfectly but file uploads.
Html form is basic html code, it has worked in mod_python:
<form action="?" method="post" enctype="multipart/form-data">
<input type="hidden" name="reload" value="foobar"/>
<input type="hidden" name="target" value="foobar"/>
<input type="hidden" name="save" value="upload_image"/>
<input type="file" name="imagename" size="15"/><br/>
<input type="submit" value="upload"/>
</form>
In my application i read the form values...
form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ)
... and i get this:
FieldStorage(None, None, [MiniFieldStorage('reload', 'foobar'),
MiniFieldStorage('target', 'foobar'), MiniFieldStorage('save',
'upload_image'), MiniFieldStorage('imagename',
'Firefox_wallpaper.png')])
I have read cgi documentation. I should get FieldStorage object which
have "file" and "filename" attributes not None. Confused. I am
probably doing something stupid but just cannot see it.