Online
Manual / Configuration
Files / Saving uploaded
files to the web server.
Command:
saveFileAttachmentTo
Usage:
Allows
you to save an uploaded file to the web server. If the file exists on
the web server, then an underscore followed by a number will be appended
to the file name.
Arguments:
- page="<form
page number>"
Specify the form page that contains the file field.
- name="<field
name>"
Specify the name of the file field to save.
- file="<server
path>"
Specify the local server path location to where you would like to save
the file to.
Example:
saveFileAttachmentTo page="1" file="/home/ollance/public_html/mailpro/images/[output
name='Image 1']" name="Image 1"
saveFileAttachmentTo page="1" file="/home/ollance/public_html/mailpro/images/[output
name='Image 2']" name="Image 2" |
This example shows how to setup the script to save the images from
the file fields named Image 1 and Image 2 to the web server.
<form method="post" action="mailpro.php?config.cfg;currentPage=1"
enctype="multipart/form-data">
...
</form> |
It is important to add the enctype="multipart/form-data"
to the <form> tag when creating file upload forms.
| Click <a href="http://www.example.com/images/[output
name='Image 1']">here</a> to view your uploaded file. |
This is an example of how to setup HTML code to link to the image.
Notice how we put [output name='Image 1'] at the end, that will be replaced
with the actual name of the file.
|