title: Uploading image file using html and javascript returning fakepath
body: <p>I am trying to upload image on my website to add it to the database as base64 encoded string. The problem is I can not receive the file path to upload it by java. On the front-end I am using HTML and javascript, here is the HTML tag: </p>
  
  <pre><code>&lt;div class="col-xs-6"&gt;
      &lt;label&gt;passport image &lt;/label&gt;&lt;input id="image-input" type="file"
                          placeholder="file"&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>in javascript I added:</p>
  
  <pre><code>document.getElementById("image-input").value;
  </code></pre>
  
  <p>The path of the image that arrives to me is 'C:\fakepath\IMAGE_NAME'.
   I need a way to send the photo or it's path to the java code, how can I do this while I am not using jsf nor spring.</p>