the built-in object gives:
Code: Select all
["qip.jpg"]
0: "qip.jpg"
length: 1
__proto__: Array(0)
<input type="file" onchange="console.info(this.files);" />
we obtain:
Code: Select all
FileList {0: File, length: 1}
0:File {name: "qip.jpg", lastModified: 1505821240418, lastModifiedDate: Tue Sep 19 2017 14:40:40 GMT+0300 (RTZ 2 (зима)), webkitRelativePath: "", size: 64682, …}
length:1
__proto__:FileList
Especially this is unclear because the choice of several files is prohibited.
Code: Select all
function fileObjToArray(files){
if(files){
var arr=[];
for(var i=0;i<files.length;i++){
arr.push(files[i].name);
}
return arr;}
return''}
Code: Select all
<span class="btn btn-primary">Browse… <input type="file" style="display:none" onchange="return angular.element($('#FileInput1')).scope().FileInput1_change(this.files)"></span>