0

I'm using JQuery FileUpload in my web application. Things are working fine. Now i want to extend the behavior and get the folder name from uploaded file. Requirement is to get the folder name when user drop a file on page or select it through the file selection dialog. For this i tried to use callback "fileuploadchange" and "fileuploaddrop". Both worked and i was able to get the selected file collection i.e data.files but data.files[0] didn't contains any information about the source folder. Any idea on how this can be achieved ?

enter image description here

Thanks in advance.

MUS
  • 1,450
  • 4
  • 17
  • 30
  • I doubt you will be able to get the path as browsers hide that information. It's a security feature. To learn more see this post: [how to resolve the C:\fakepath?](http://stackoverflow.com/questions/4851595/how-to-resolve-the-c-fakepath) – Yogi May 19 '15 at 07:40

1 Answers1

2

You can only get info on what the user decides to "give" you, for security reasons. You might get that functionality by using some flash plugin, but with html/js you are not allowed into the users pc, not even folder names (thankfully)

monxas
  • 2,475
  • 2
  • 20
  • 36