Andy
Andy

Reputation: 13

Using angular I want to input two files with same name but different file extension by doing the input of just one

<input #fileInput hidden="true" type="file" accept="*" (onChange)="uploadFile($event)"/>

and in my component.ts

uploadFile(fileEvent){}

Upvotes: 1

Views: 250

Answers (1)

mithus7
mithus7

Reputation: 575

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.

Upvotes: 1

Related Questions