[Fixed]-How to fill an <input type="text"> with the value of the absolute filepath, chosen with a file upload dialog?

1👍

Most modern browsers don’t give access to filesystem. And when you choose to upload a file, it replace the real path.
Try:
<input type="file" onchange="alert(this.value)"/>

Will give you C:\fakepath\Myfile.txt

👤Cyrbil

Leave a comment