you cant change the value of the input type = ‘file’ in a form because of security reasons.
But is it possible to read the value at all with javascript to then check extensions and validate the form? or will that also be a security breach?
Some examples would ease my pain…
thanks
You can only read the name of the file and it’s extension, so eg: ‘file.zip’. It won’t tell you the path, unless you are using IE.
Here’s a simple example:
This will give you the filename + extension..