I want to select multiple files from different directories by using html input type="file" element. I couldn't find any resource to do this. is there any npm package available that can be used either in react js or vue js?
CodePudding user response:
I don't know much js like an expert but I also tried to look on overflow and found a thread. Hope this could help you. HTML multiple file upload from different folders
CodePudding user response:
on input
element add multiple
attribute
<input
type="file"
name="upload-files"
multiple
/>
If on chrome. firefox and and to upload folder.
<input
type="file"
name="upload-files"
multiple
directory={isDirectorySelectable ? "directory" : null}
webkitdirectory={isDirectorySelectable ? "webkitdirectory" : null}
/>