From 0f6bf27d50a8d12823af28297d6ce211d8b3170d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KUB=C3=8D=C4=8CEK=20Daniel?= Date: Thu, 23 May 2024 13:34:08 +0200 Subject: [PATCH] Fixed #15664 - Cancel upload file request --- src/app/components/fileupload/fileupload.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/components/fileupload/fileupload.ts b/src/app/components/fileupload/fileupload.ts index 8e788cf2ad8..04f073cfc06 100755 --- a/src/app/components/fileupload/fileupload.ts +++ b/src/app/components/fileupload/fileupload.ts @@ -749,7 +749,7 @@ export class FileUpload implements AfterViewInit, AfterContentInit, OnInit, OnDe } // If the previous upload hasn't been finished, it is aborted. - this.cancelUploadRequst(); + this.cancelUploadRequest(); this.fileUploadSubcription = this.http .request(this.method, this.url as string, { @@ -810,7 +810,7 @@ export class FileUpload implements AfterViewInit, AfterContentInit, OnInit, OnDe clear() { this.files = []; this.uploadedFileCount = 0; - this.cancelUploadRequst(); + this.cancelUploadRequest(); this.onClear.emit(); this.clearInputElement(); this.cd.markForCheck(); @@ -822,7 +822,7 @@ export class FileUpload implements AfterViewInit, AfterContentInit, OnInit, OnDe * @group Method */ remove(event: Event, index: number) { - this.cancelUploadRequst(); + this.cancelUploadRequest(); this.clearInputElement(); this.onRemove.emit({ originalEvent: event, file: this.files[index] }); this.files.splice(index, 1); @@ -842,7 +842,7 @@ export class FileUpload implements AfterViewInit, AfterContentInit, OnInit, OnDe /** * Cancel upload file request. * */ - cancelUploadRequst() { + cancelUploadRequest() { if (this.fileUploadSubcription) { this.fileUploadSubcription.unsubscribe(); this.fileUploadSubcription = undefined;