1

In my angular5 File upload is a trigger onchange event, but when I select the same file twice it's not selected.

My problem similar to this HTML input file selection event not firing upon selecting the same file

<input type="file" class="upload-file" onclick="this.value=null" (change)="handleFileInput($event.target.files,'doc')"> 

but its not working

1 Answer 1

2
<input #fileInput type="file" id="fileid" (click)="fileInput.value = null" value="" (change)="handleFileInput($event)" > 

every time you click on file input it will clear its value so even if you select the same file (change) will fire.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.