[Zope] MegaMedia Upload External Method -- need advice

Loren Stafford lstafford@icompression.com
Thu, 23 Sep 1999 18:37:08 -0700


You who have experience with file uploads please tell me if what I am about
to do is reasonable.

I want to make a ZClass -- call it "MegaMedia" -- whose instances represent
(1:1) massive multimedia files that are stored on the file system.

Somewhere in MegaMedia, there must be an external method that writes the
file being uploaded into it's rightful place in the Unix filesystem. I
imagine that I can just subclass FieldStorage from cgi.py, and override the
make_file method with my own method that figures out where the file will
reside on the filesystem.

Thus, uploaded files will be written to disk only once -- no temporary
files.

Is this a sensible strategy? It seems too easy, to be true.

What worries me is what Unix does with the payload before FieldStorage opens
STDIN. I suppose Unix stores the file in a I/O buffer in virtual memory. How
can you possibly be sure you have enough VM for all the multimegabyte
multimedia files that might be uploaded at once?

-- Thanks
-- Loren