Fakepath issue in chrome while getting file input value

edited February 2014 in General
I have an UI designed in HTML which is having one browse button input for taking file from the local directory. Now i am retrieving this file input value with the help of java script function "getElementById". I need to send this file input value to one java class as an URL parameter. In IE, I am getting the real directory path value of the file but in chrome it is giving as "C:\fakeath\file name" and in Mozilla just the file name. I know this is due to some security issue in Chrome and Mozilla. But i really need t get this file path and send it as a parameter to the java file. Please suggest me the solution for this or any other alternatives.

Thank You


  • No modern browser is going to provide you with the full file path on the user's machine to the file they wish to upload. This is for security reasons.

    Can you share a little more about what you're trying to accomplish and we can suggest a workaround.
This discussion has been closed.