[thelist] Local path of uploaded file

Anthony Baratta anthony at baratta.com
Wed Oct 28 09:07:51 CDT 2009

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

You can't. It's a browser security issue.

Option 1: Add some JS browser side to validate the form. (Keep the 
server side validation!) That will minimize (but not eliminate) the form 
refresh issue.

Option 2: Create an AJAX widget for the form upload and hold it 
temporarily in stasis on the server until the full form form is submitted.

Anthony Baratta

No storyteller has ever been able to dream up anything as fantastically 
unlikely as what really does happen in this mad Universe.
-—Lazarus Long

More information about the thelist mailing list