[Zope] How to get the path?
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
> With <input type="file" name="file"> I get the filename...right?
First of all, you get the file as a "ZPublisher.HTTPRequest.FileUpload"
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.