mod_python + vampire file upload not working

jacob.miles at gmail.com jacob.miles at gmail.com
Mon Dec 19 02:48:36 CET 2005


I'm trying to implement a file upload using vampire on top of
mod_python, using vampire's publisher.  My form has an input that looks
like:

<form action="/FileAdmin/uploadFile" method="post">
<input type="file" name="uploadFile"/>
<input type="submit"/>
</form>

and in ImageAdmin.py I define the uploadFile function:

def uploadFile (req, uploadFile=None):
    # etc.

the problem is that when this function is called, uploadFile contains
the filename as a string, rather than a file object or the mod_python
Field object.  The string provided is also just the last part of the
filename, i.e. doesn't include any path, so I can't even access the
temporary file as I'd like.

Does anyone know what's going on here?  Is this a problem with vampire?
 mod_python?  me?

- Jake




More information about the Python-list mailing list