0

I have one issue to resolve my problem. My problem is to get the full path of local image. I get my path as: "/fipcurren/mytestfolder/imgs/school.jpeg" and my program showed "C:\fakepath\school.jpg".

My code to get path are:

In HTML file:

<input id="imagePath" class="file"  type="file" multiple data-min-file-count="1" accept="image/*">

In JavaScript file:

data.imagePath = document.getElementById("imagePath").value;

I try this above, but not resolve the problem:

data.imagePath = document.getElementById("imagePath").files[0].name;

Someone help me? Thanks

fipcurren88
  • 701
  • 5
  • 26
  • 3
    Possible duplicate of [how to resolve the C:\fakepath?](http://stackoverflow.com/questions/4851595/how-to-resolve-the-c-fakepath) – Nati Nov 07 '15 at 18:42
  • it's a security issue. look at http://stackoverflow.com/questions/4851595/how-to-resolve-the-c-fakepath – Nati Nov 07 '15 at 18:42

0 Answers0