0

Currently, I can let users upload multiple files with HTML File Input.

<input type="file" id="files" name="files" multiple>

Instead of just files, how do I let users upload an entire directory and its subdirectories with HTML/JavaScript?

I can only allow users to drag and drop folders which works fine but the users also need to be able to select entire folders with a folder/file selection dialog.

Dropbox has an upload folder feature as shown in the screenshot below.

Folder Upload Dialog Box

Note: This is not a question concerning server side file uploading ability but just being able to select directory in the web browser.

Philipp Meissner
  • 5,273
  • 5
  • 34
  • 59
Vivek Ghimire
  • 57
  • 1
  • 5

1 Answers1

0

In HTML file input upload, a folder cannot be selected by default instead, all files in the folder will be selected instead

Qudusayo
  • 1,026
  • 9
  • 15
  • I understand that and that's exactly what I'm trying to achieve but by letting users select a folder in order to extract its contents and not just files. Like dropbox's Upload Folder feature. – Vivek Ghimire Aug 04 '20 at 03:53