Last updated on November 20, 2017
We can use webkitdirectory
to allow uploading an entire folder or folders of files without selecting each file manually.
webkitdirectory
webkitdirectory
is a non-standard attribute that allows users to pick a directory via a file input. Currently supported in Chrome, Firefox, and Edge.
Uploading Directories At Once
Here is example script, I have used bootstrap to style it.
Folder upload
Just to test, I have selected a directory called controllers, and I am getting list of all files in that directory and its subfolders as shown below