0

I don't know if I could upload both file and folder in the same <input> tag. I've made it by drag-drop. But I want to do it by selecting files

In chrome, this allows me to select one folder.

<input class="input-button" type="file" multiple="multiple" webkitdirectory="" directory=""></input>

This allows me to select mutiples file but not folder

<input class="input-button" type="file" multiple="multiple" ></input>

How could I select both folder and files? Thank you very much

ysfseu
  • 666
  • 1
  • 10
  • 20

1 Answers1

0

No. Not at chrome, chromium. firefox provides two separate <input> element where allowdirs attribute is set, chrome, chromium do not. You can use two separate <input> elements. One with multiple attribute set, one with webkitdirectory and allowdirs set.

guest271314
  • 1
  • 15
  • 104
  • 177
  • @ysfseu See also [How to upload and list directories at firefox and chrome/chromium using change and drop events](http://stackoverflow.com/questions/39664662/how-to-upload-and-list-directories-at-firefox-and-chrome-chromium-using-change-a) – guest271314 Feb 13 '17 at 04:32