Having read the answer to this question:
How to upload folder in web application‘, is a web application able to browse a folder structure on the client user’s machine?
This would be useful to, say, upload all files and subfolders within a nested folder structure without the user having to navigate the entire target folder heirarchy herself.
I assume this is not possible because HTML/Javascript executing by itself (not in conjunction with Java or Flash plugin) does not have permission to browse folders the client machine? But some of my colleagues disagree so I want to put the question out there.
If it is possible, then how? I’m looking for the theory here, not a full code solution, but not so theoretical that you’ve never verified it.
Answer: Not possible
Since no one has answered and I haven’t been able to find a hint of doubt reading through W3C specs and IEFT HTML and HTTP RFCs I am 99% sure this is not possible (probably why no one answered).
It would be a security risk. If a webpage could browse a folder your personal data could be compromised by a website that started browsing from c drive root.
The <input type=”file” … /> tag doesn’t return the file path information, just the file stream and its metadata anyway, so it’s doubt there’s some other a HTML entity that can be used to post back file path information on a file upload.