I\'m trying to loop through a Filelist:
console.log(\'field:\', field.photo.files)
field.photo.files.forEach(file => {
// looping code
})
Following code is in Typescript
urls = new Array();
detectFiles(event) {
const $image: any = document.querySelector('#file');
Array.from($image.files).forEach((file: any) => {
let reader = new FileReader();
reader.onload = (e: any) => { this.urls.push(e.target.result); }
reader.readAsDataURL(file);
}
}