Online
Manual / Creating The Templates / File
attachment information output
This <output>
allows you to output information about a file upload.
Usage:
<output type="attachment" name="[field]" attribute"[name|type|size|tmp_name|error]">
Arguments:
- name="[field]"
The name of the file field.
- attribute="[name|type|size|tmp_name|error]"
name - returns the
original name of the file on the client machine.
type - returns the mime type of the file, if the browser provided this
information. An example would be "image/gif".
size - returns the size, in bytes, of the uploaded file.
tmp_name - returns the temporary filename of the file in which the uploaded
file was stored on the server.
error - returns the error code associated with this file upload. ['error']
was added in PHP 4.2.0
Example:
Here's
an example on how to show the name of the file that was uploaded.
| [output
type='attachment' name='File 1' attribute='name'] |
Or, to
show what the file size is.
| [output
type='attachment' name='File 2' attribute='size'] |
|