[mod_python] File/Image upload

Victor Tortorello Neto neto at visuaw.net
Thu Jul 8 02:33:09 EDT 2004


Hello!

I'm trying to upload an image to server. I was trying on Windows, opening an 
"fd" and writing image content in the fd.

I don't know if it's the best way to do this, if you know a better way please 
tell me! :)

Everything happens ok with Windows, open the fd with os.O_BINARY flag.

Today I have to migrate the web site to Linux, and only image upload has a 
problem, this problem.

Well, my question is:

Has some flag equivalent to Windows O_BINARY on Linux?

And my error output:

IOError: image file is truncated (30 bytes not processed)

Thanks in advance!

Victor Tortorello Neto


More information about the Mod_python mailing list