How to pull multiple html5 jquery files

How to extract multiple files using FileSystem Api (Html5) and send to javascript as an array. I'm actually trying to select multiple files and add them to my slide show.

Any help would be appreciated.

Relationship --AJ

+1
javascript html5 file-upload
Apr 27 2018-11-17T00:
source share
1 answer

You need to add the multiple attribute to your input.

  <input type="file" multiple /> 

You can also add webkitdirectory , directory and / or mozdirectory to indicate that you want to allow users to download entire folders. They are not standard, obviously (although a simple ol directory is / maybe)

Then, in your JavaScript, your input element will have an array of files containing meta-information for the selected files, matured for use in the FileReader API. For example:

  <input type="file" multiple onchange="doSomethingWithThese(this.files)" /> 

(I do not recommend inline JavaScript, for example)

+1
Apr 27 '11 at 18:05
source share



All Articles