[mod_python] upload file?

Oliver Graf ograf at rz-online.net
Fri May 7 14:39:12 EST 2004


On Fri, May 07, 2004 at 08:14:02AM -0400, John Mudd wrote:
> I'm hoping this will make whatever mistake I'm making easier to see. 
> Any suggestions?

isinstance(item.file, FileType) will certainly fail, cause StringIO
objects or not of type FileType, normally. And item.file is either
None or a StringIO instance.

Read the modpython docs. They will tell you that a string item is a
instance of StringField and a file item is a instance of Field.

http://modpython.org/live/current/doc-html/pyapi-util-fstor.html

Oliver.



More information about the Mod_python mailing list