how to upload a file in localhost web server, and get the file path

I’ve deployed a web localhost, http://localhost:8080
and I included the following code to take a upload file.

    <form action="/action_page.php">
      <input type="file" id="myFile" name="filename">
      <input type="submit">
    </form>

I am trying to read file name and file path in the local web server in my javascript code.
How can I get those two?