How to get folder directory from HTML input type "file" or any other way? -


so have basic form input type "file" want user able select folder location , not file.

how can input select folder , not file, or there way it?

stumbled on page well, , found out possible javascript (no plugins activex or flash), in chrome:

https://plus.google.com/+addyosmani/posts/dk5uhz6zff3

basically, added support new attribute on file input element "webkitdirectory". can use this:

<input type="file" id="ctrl" webkitdirectory directory multiple/>

it allows select directories. multiple attribute fallback browsers support multiple file selection not directory selection.

when select directory files available through dom object control (document.getelementbyid('ctrl')), multiple attribute. browsers adds files in selected directory list recursively.

you can add directory attribute in case gets standardized @ point (couldn't find info regarding that)