2

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?

darkfrog
  • 1,053
  • 8
  • 29
  • It must be included to support uploading folders. I want to support folder or file, not one or the other. – darkfrog Sep 07 '17 at 21:06
  • In that case, it looks like you'll have to use JS. See https://stackoverflow.com/questions/30049276/handle-directory-files-upload-with-one-input-javascript – blurfus Sep 07 '17 at 21:17
  • @ochi, unfortunately, that only deals with drag-and-drop. My drag-and-drop functionality works exactly as it should, but the modal file input popup is what I'm trying to solve right now. – darkfrog Sep 07 '17 at 21:19

1 Answers1

1

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)

CodeWizard
  • 128,036
  • 21
  • 144
  • 167