[thelist] Local path of uploaded file

Roel Mulder roel.mulder at gmail.com
Wed Oct 28 07:55:48 CDT 2009

Hi all,
So I have a form that uploads a file, along with some text fields. PHP
validates the form, and returns the visitor to the form if not all
criteria are met.
The upload form is then empty.

My question is: how do I keep the local path + file name in the <input
type="file" /> input field?

Google points me back in time to 2003:
where it should be provided by js. However, when I test it, it only
returns the original file name (same as $_FILES['userfile']['name'] ).
Actually FF returns the file name "test-file.pdf" only, IE returns
"C:\fakepath\test-file.pdf" whilst the file came from a network share.

Does anyone have a suggestion, or provide a hyperlink to a working example?

More information about the thelist mailing list