[Zope] How to get the path?
Dieter Maurer
dieter@handshake.de
Mon, 10 Mar 2003 22:27:12 +0100
Sorin Marti wrote at 2003-3-10 08:30 +0100:
> I want to upload files to the filesystem on my server (not into zope's
> Data.fs)
>
> With <input type="file" name="file"> I get the filename...right?
First of all, you get the file as a "ZPublisher.HTTPRequest.FileUpload"
instance.
Such an instance behaves like a file (you have the typical
Python file operations: "read", "seek", "tell", ...).
In addition, they have additional attributes which inform
about the HTTP context: "filename" (the name of the file
uploaded) and "headers" (maybe similar -- view the source!)
with the MIME headers associated with this file.
Dieter