upload — handle a file uploaded by a client.
::rivet::upload (channel | save | data | exists | size | type | filename)
The upload command is for file upload manipulation.
See the relevant Apache Directives to further configure the
behavior of this Rivet feature.
::rivet::upload channel ?
When given the name of a file upload
returns a Tcl channel that can be used to access the
::rivet::upload save ?
::rivet::upload data ?
Returns data uploaded to the server. This is binary clean
- in other words, it will work even with files like
images, executables, compressed files, and so on.
::rivet::upload exists ?
Returns true if an upload named ?uploadname?
exists. This can be used in scripts that are meant to
be run by different forms that send over uploads that
might need specific processing.
::rivet::upload size ?
Returns the size of the file uploaded.
Content-type is set, it is
returned, otherwise, an empty string.
::rivet::upload filename ?
Returns the filename on the remote host that uploaded the file.
::rivet::upload tempname ?
Returns the name of the temporary file on the local host that the file was uploaded into.
Returns the variable names, as a list, of all the files uploaded.
See Example 4, “File Upload”.