Folder Choose in Html -
i want users select folder path.
for example;
user choose 'd:/example/' folder.
then im save 'd:/example/' database.
<input type='file'> doesnt work me . need folder path
how can ?
edit: everyone show answer
but not question. listing directory.
i want folder path d:/asd/ user pick asd folder on d.
so save database 'd:/asd/' .just this
i dont know how can explain more.
i hope can you
you can see folder name in alert when select file
<script type="text/javascript"> function getfolder(e) { var files = e.target.files; var path = files[0].webkitrelativepath; var folder = path.split("/"); alert(folder[0]); } </script> <input type="file" id="flup" onchange="getfolder(event)" webkitdirectory mozdirectory msdirectory odirectory directory multiple />
Comments
Post a Comment