clear selected files each time new files are selected

This commit is contained in:
2025-06-28 10:49:35 -07:00
parent 3ce2c1b9fc
commit c08cf9ff43
4 changed files with 4 additions and 3 deletions
@@ -31,7 +31,7 @@ export class ForgotPasswordComponent {
this.errorMsgs = []; this.errorMsgs = [];
// Send to server and wait for response // Send to server and wait for response
this.errorMsgs.push("Waiting for login response from server"); this.errorMsgs.push("Waiting for response from server");
const body = new HttpParams() const body = new HttpParams()
.set("Email", this.email) .set("Email", this.email)
const headers = new HttpHeaders({ const headers = new HttpHeaders({
@@ -40,7 +40,7 @@ export class ResetPasswordComponent {
} }
if (this.errorMsgs.length == 0){ if (this.errorMsgs.length == 0){
// Send to server and wait for response // Send to server and wait for response
this.errorMsgs.push("Waiting for login response from server"); this.errorMsgs.push("Waiting for response from server");
const body = new HttpParams() const body = new HttpParams()
.set("UserName", this.UserName) .set("UserName", this.UserName)
.set("NewPassword", this.Password) .set("NewPassword", this.Password)
@@ -24,7 +24,7 @@
<div class="frame-item"> <div class="frame-item">
<!-- Need to fix for image file upload --> <!-- Need to fix for image file upload -->
<div id="FileUploadPlaceholder" ></div> <div id="FileUploadPlaceholder" ></div>
<input type="file" (change)="onFileSelected($event)" accept="image/*" /> <input type="file" (change)="onFileSelected($event)" accept="image/*" multiple />
</div> </div>
<div class="flex-row"> <div class="flex-row">
@@ -43,6 +43,7 @@ export class NewItemComponent {
onFileSelected(event: Event){ onFileSelected(event: Event){
const fileInput = event.target as HTMLInputElement; const fileInput = event.target as HTMLInputElement;
this.imagePreviews = []; this.imagePreviews = [];
this.selectedFiles = [];
if (!fileInput.files?.length){ if (!fileInput.files?.length){
return; return;