-1

I used this:

$('input[type=file]').val()

to get the full file path selected, but it returned the fakepath, as in "C:\fakepath\filename.jpg". The "fakepath" part was actually there - not sure if it's supposed to be, but this is my first time working on webapp.

How can I just get the full file path (c:\Phone\DCIM\Camera\filename.jpg)?

As I want to call out the file when user click on the link.

tweetycoco
  • 9
  • 1
  • 3
  • You can't due to security restriction. – RyanB Oct 08 '13 at 07:44
  • possible duplicate of [How to get full path of selected file on change of using javascript, jquery-ajax?](http://stackoverflow.com/questions/15201071/how-to-get-full-path-of-selected-file-on-change-of-input-type-file-using-jav) – karthick Oct 08 '13 at 08:34

1 Answers1

2

Browser can never provide the full path for a file because of security issues.

Harpreet Singh
  • 647
  • 10
  • 24