try to use multiple attribute in your input and check. <input #fileInput hidden="true" type="file" accept="*" (onChange)="uploadFile($event)" multiple/>
@FarhatZaman I don't want to use multiple, I want to restrict the user to select only one file, like abc.doc then our code should check and pick the abc.pdf along with abc.doc.
Javascript will not allow you to read a file that was not selected through file selector for security reasons. It would be a major security breach if you entered a web page and it could read randomly files in your system.
multipleattribute in your input and check. <input #fileInput hidden="true" type="file" accept="*" (onChange)="uploadFile($event)" multiple/>