[Zope-dev] FileUpload questions

Toby Gustafson tobyg at tyrell.com
Tue Aug 12 14:18:52 EDT 2003


Hello,

   I have been looking at the FileUpload class defined in HTTPRequest.py
but am still a little confused about how it works.

   When a form is submitted with an <input type="file" ...>, where are the
contents of the uploaded file stored?  Is it automatically stored in the
ZODB, or is it stored in memory until some other code (like that in
Image.py) stores it?

   The reason I am asking is that I want to store uploaded files on the
file system instead of in the ZODB.  (We are running Zope behind an Apache
web server, so the uploaded files will be placed under Apache's document
root so they can be served directly by Apache.)  Being new to Zope and
Python, it is not clear to me exactly how to go about this.

   Any suggestions would be appreciated, or if somebody knows where there
is some sample code and could point me to it, that would be great too.

Thanks,
--Toby.
---------------------------
Toby Gustafson
Senior Software Engineer
Tyrell Software Corporation
Email: tobyg at tyrell.com
---------------------------




More information about the Zope-Dev mailing list