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 = [];
// 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()
.set("Email", this.email)
const headers = new HttpHeaders({
@@ -40,7 +40,7 @@ export class ResetPasswordComponent {
}
if (this.errorMsgs.length == 0){
// 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()
.set("UserName", this.UserName)
.set("NewPassword", this.Password)
@@ -24,7 +24,7 @@
<div class="frame-item">
<!-- Need to fix for image file upload -->
<div id="FileUploadPlaceholder" ></div>
<input type="file" (change)="onFileSelected($event)" accept="image/*" />
<input type="file" (change)="onFileSelected($event)" accept="image/*" multiple />
</div>
<div class="flex-row">
@@ -43,6 +43,7 @@ export class NewItemComponent {
onFileSelected(event: Event){
const fileInput = event.target as HTMLInputElement;
this.imagePreviews = [];
this.selectedFiles = [];
if (!fileInput.files?.length){
return;