0

I used normal file type I just want to know how can I retrieve selected file path I tried to do .val() function but in these case I am able to file out only file name not a whole location of file where it's store in my local machine can anyone please help me out regarding these....

thanks

  • val() retrieves the whole path not just the filename – Shehabic Mar 01 '13 at 12:10
  • See http://stackoverflow.com/questions/6866309/absolute-path-to-file-on-inputtype-file – hsan Mar 01 '13 at 12:10
  • $('#upload').live('change', function(){alert("Pranali"+this.value) });I did these but I just got test.jpg not whole location where it's stored – user2123421 Mar 01 '13 at 12:12
  • http://stackoverflow.com/questions/3489133/full-path-from-file-input-using-jquery will help – sasi Mar 01 '13 at 12:17
  • Why do you need the local path? What are you trying to do? Perhaps there are better alternatives... – hsan Mar 01 '13 at 12:22

1 Answers1

0

You can't do it because : It's a security feature in all browsers.

The full path on the client is not available to you. The browser acts as an intermediary, allowing the user to select a file, and sending the contents to the server, but never allowing the page to know any more than it absolutely must.

Devang Rathod
  • 6,650
  • 2
  • 23
  • 32