[mod_python] mod_python: handling file uploads

Ruben K. midreth at gmail.com
Sat Mar 24 11:22:27 EST 2007

I built a simple website framework that is not compatible with the
publishing handler, now I am looking to build a feature into that framework
to handle uploads.

While researching on my own how to do this I found that mod_python's
documention is very lacking
in this area.

I have the following questions:

- In which part of mod_python's instance (usually named req or request) is
the uploaded file information found?
- How would I go about moving temporary files to the target directories?
Would I want to open() a file with w+ or something (create if doesn't exist)
and write() the temporary file's content into it?
- Is there a default handler for actions like this?

Ruben K.

On 3/24/07, Roberto C. Sánchez <roberto at connexer.com> wrote:
> On Sat, Mar 24, 2007 at 04:58:47PM +0100, Ruben K. wrote:
> > Hello,
> >
> > How would I go about file uploads without using the publishing handler?
> >
> Insufficient information.  Please provide details.
> Regards,
> -Roberto
> --
> Roberto C. Sánchez
> http://people.connexer.com/~roberto
> http://www.connexer.com
> Version: GnuPG v1.4.1 (GNU/Linux)
> iD8DBQFGBU2A1snWssAFC08RAhMrAKCIs+nztWDdP70KvW6g+jqxdcFQ9wCfUIYC
> Yi/bytiAo6qUPF90zZM9CY8=
> =J7S8
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20070324/2e55502c/attachment.html

More information about the Mod_python mailing list