Upload File Example #18
|
|
This form is using the enctype attribute on the FORM
tag to upload a file from the workstation to the web server.
Also the TYPE="file" attribute is used on the Form
INPUT tag which will put a browse button on the form allowing
the user to browse and select a file to attach.
That's it.
Things you may want to note:
- Look at the document source to see the
enctype attribute.
- A file is uploaded from the workstation and stored temporarily
on the server. This file will be deleted when the receiving Cool ICE service
returns a page to the browser.
- For every
INPUT field with TYPE="file" two
variables will be passed to the Cool ICE service. In the above form the
INPUT field has NAME="MyFile".
- Variable "MyFile" will contain the name of the file name on the
workstation.
- Variable "FUMyFile" will contain the name of the temporary file on the
server. The name "MyFile" will be prefixed with the characters
"FU" (File Upload).
- The receiving Cool ICE service will use the "FUMyFile" variable to
retrieve the content of the uploaded file.
Back to example 17
or
forward to example 19.