title: Handle directory/files upload with one input javascript
body: <p>I want to allow users dragging and uploading directory and files.</p>
  
  <p>i know i could create</p>
  
  <pre><code>&lt;input type="file" multiple /&gt;
  &lt;!-- for files/multiple files upload--&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;input type="file" directory mozDirectory webkitDirectory /&gt;
  &lt;!-- for directory uploads --&gt;
  </code></pre>
  
  <p>i tried detecting while user is dragging the item if it is a directory or file and setting directory attribute depending on that, but turns out that javascript doesn't allow you to check that.</p>
  
  <p>also i have seen on lot of websites that users are able to drag both files and directories together and even multiple directories.</p>
  
  <p>how can i achieve that?</p>