FileUpload.value (Property)

The file name entered by the user for the file to be uploaded.

Availability:

DOM level - 1
JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0
Opera - 3.0
Property/method value type:String primitive
JavaScript syntax:-myFileUpload.value

This property yields the name of the file that is to be uploaded. You may want to check this for its suitability. Perhaps you need a text file and the user chose an executable. Careful checking at the client can save serious problems at the server when your data processing code receives the uploaded file. Sending an image file to a server back-end that was expecting a small text file containing short lines can cause a server crash.

See also:Input.value, UniversalFileRead