Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML File Input - How do I allow files and directories?

I currently have the following:

<input id="file-upload-input" type="file" multiple="" webkitdirectory="webkitDirectory">

This works great for uploading directories, but I can no longer select individual files. Is there no way to support uploading files and directories?

like image 553
darkfrog Avatar asked Sep 12 '25 08:09

darkfrog


1 Answers

As for today, You cant do with html only.
You will have to use JS code or adding 2 input 1 per each type (file & folder)

like image 146
CodeWizard Avatar answered Sep 14 '25 00:09

CodeWizard