I am facing some issue while uploading same file multiple times using angular. I am explaining my code below.
<label [for]="'file' + i" style="width: 100%;cursor: pointer;text-align: center;">
<div id="drop_zone" (drop)="dropPayLoad($event, i, fileType.CONFIG_FILE)" (dragover)="allowPayloadDrop($event, i, fileType.CONFIG_FILE)">
<span class="pat-span">{{fileLableArr[i]['config_name']}}</span>
<input type="file" hidden [id]="'file' + i"
(change)="handleUploads($event.target.files, fileType.CONFIG_FILE, i)">
<span *ngIf="fileLableArr[i]['isConfig']" style="position: relative;top: 6px;left: 5px;font-size: 31px;"
(click)="$event.preventDefault();deleteUploadedFile($event, fileType.CONFIG_FILE, i)">×</span>
</div>
</label>
Here using input type = file
when I am uploading same file again and again then first time its uploading successfully but next time its now allowing to upload and even the (chnage)
event not triggered. Here I need to also allow same file multiple times and the change event should triggered. I did the google search and added some solution like this.value=null
but that also not working. Let me to know if anybody can help me to resolve this issue.