I wanted to know what attributes are available to work with for the multiple file input tag, such as:
<input multiple="" type="file" id="inp" name="inp[]">
I wanted to know what attributes are available to work with for the multiple
Share
I have found that some nice js to work to get the filenames, but seems jQuery will have to catch up? I do not get the depth of attributes from jQ that I get from document.
var myInp=jQ 1.7.2 $(“#inp”);
var myInp=document.getElementById(“inp”);
From jQ I only got the first file, while from document.gEBI() the rest of the info about the multiple files selected was available. What I found is there is a files property
inp.files
which is an object having a File object for each of the files, a length property whose value is the file count, and an item method:
0 [object File]
… //iterating to the (n-1)th file count
n [object File]
length m //m being the number of files
item function item(){[native code]}
Digging deeper, for the first file:
inp.files.item(0)
I found that item holds properties and methods for each file:
1) size
2) type
3) slice function slice(){[native code]}
4) mozSlice function mozSlice(){[native code]}
5) name
6) mozFullPath
I have not found this information anywhere else. I hope it helps you 🙂