• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

149
Views
Unable to upload same file multiple times using Angular

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)">&times;</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.

almost 3 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error