0

I see that CSS Bootstrap supports file selection, but I can't seem to find anything related to selected a folder. Is this possible with CSS Bootstrap?

I'm trying to create a simple prototype that allows the user to click a button, which opens a folder selection window/box. From there, they can select a folder and the html would save the path to that folder as a string.

Any ideas?

Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122
Roka545
  • 3,404
  • 20
  • 62
  • 106
  • Possible duplicate of [Directory Chooser in HTML page](http://stackoverflow.com/questions/2809688/directory-chooser-in-html-page) – Heretic Monkey Oct 10 '16 at 21:34
  • Note that there is [a proposal](https://wicg.github.io/directory-upload/proposal.html) to allow for selecting a folder for upload. – Heretic Monkey Oct 10 '16 at 21:43

1 Answers1

1

Not really related to bootstrap - it's more of a "browser's feature" (and it's not possible due to security reasons).

When you upload a file - you can select the file in your computer and the browser knows how to send the content of the file to the server. It's not something that you can do using "pure" browsers features (including javascript).

You can develop flash/java application that will give you the ability to browse the filesystem and select a folder, and from that point you can do everything you want with the selected value.

Dekel
  • 60,707
  • 10
  • 101
  • 129