Uploaded files unable to see in the carousel, Im able to see video and image files, please suggest me to see all formats of the docs as well.
mydata = []
onSelectFile(event) {
const files = event.target.files;
if (files) {
for (const file of files) {
const reader = new FileReader();
reader.onload = (e: any) => {
if (file.type.indexOf("image") > -1) {
this.mydata.push({
url:e.target.result,
type: 'img'
});
} else if (file.type.indexOf("video") > -1) {
this.mydata.push({
url:e.target.result,
type: 'video'
});
}else if (file.type.indexOf("ppt") > -1) {
this.mydata.push({
url:e.target.result,
type: 'ppt'
});
}
};
reader.readAsDataURL(file);
}
}
}