[mod_python] file upload

john spurling synec at viscous.org
Thu Jul 1 15:29:55 EDT 2004


Greetings,

I'm trying to do file upload, and whenever I set the form's enctype
attribute to be multipart/form-data, I get the following error from
the publisher, even when the form posts to a function that just
returns "hello":

## begin
Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

  File
"/home/synec/prog/python2.3/lib/python2.3/site-packages/mod_python/apache.py",
line 193, in Dispatch
    result = object(req)

  File
"/home/synec/prog/python2.3/lib/python2.3/site-packages/mod_python/publisher.py",
line 104, in handler
    val = File(field)

  File
"/home/synec/prog/python2.3/lib/python2.3/site-packages/mod_python/publisher.py",
line 308, in __init__
    for m in field.file.__methods__:

AttributeError: 'file' object has no attribute '__methods__'
## end

Any ideas?

Thanks,
john spurling




More information about the Mod_python mailing list