Skip to content

Commit

Permalink
Fixed #15664 - Cancel upload file request
Browse files Browse the repository at this point in the history
  • Loading branch information
KUBÍČEK Daniel committed May 28, 2024
1 parent 2bdc54b commit 0f6bf27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/components/fileupload/fileupload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(<string>this.method, this.url as string, {
Expand Down Expand Up @@ -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();
Expand All @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 0f6bf27

Please sign in to comment.