[Angular] Check File if Image

4 views
Skip to first unread message

jamester go

unread,
Jul 16, 2018, 2:53:38 AM7/16/18
to ang...@googlegroups.com
Hi Good Day


I have this scenario where i wanted to check if the the file that i am selecting is an image,

<input mat-input #fileInput type="file" style="display:none;"
(change)="handleFileInput($event.target.files)" accept="image/*"/>

i have already included accept criteria in the html tag yet i still want to
pop up some alert that the image is not an image



Thanks for answering


have a good day :)
Reply all
Reply to author
Forward
0 new messages