0

I want to add functionality where user can either upload entire directory having images or can upload single/multiple images inside directory. I know how to make input field to select multiple images or make it to upload entire directory using following ways:

<input accept="image/x-png,image/gif,image/jpeg" required="" type="file" name="photos[]" id="photos" multiple="">

and for directory:

<input accept="image/x-png,image/gif,image/jpeg" required="" type="file" name="photos[]" id="photos" multiple="" directory="" webkitdirectory="" mozdirectory="">

But how can I use both of these features together? As if I use 1st approach I can't select folders and when use second can't select individual images.

ÛmÄîr MÄlîk
  • 453
  • 2
  • 10
  • 23
  • You probably miscopied your code, the *directory* one is just a multiple one. Also, you can't do what you want with a single input (IIRC, it's actually even an OS restriction), and I think I already saw a duplicate. – Kaiido Feb 02 '18 at 07:52
  • @Kaiido thanks for correction, I've updated it now. And if you have found it's duplicated question please give me it's link if possible, I've found it. – ÛmÄîr MÄlîk Feb 02 '18 at 07:56

0 Answers0