Skip to content

FileUpload: Never cancels the upload request when I click on the cancel button. #15664

@kubedan

Description

@kubedan

Describe the bug

If I upload a (large) file and cancel it before it has been uploaded, the HTTP upload request is never canceled.

Environment

Doesnt matter.

Reproducer

https://stackblitz.com/edit/zjfynw

Angular version

17.3.7

PrimeNG version

17.17.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v18.20.3

Browser(s)

No response

Steps to reproduce the behavior

https://stackblitz.com/edit/zjfynw

Add file for upload
01-add-file-for-upload

Click on upload button
02-click-upload-button

Click on remove file button
03-click-cancel-upload

It continues uploading
04-continue-uploading

And it finishes uploading.
05-finishes-uploading

Expected behavior

When I click on the remove file button, it unsubscribes from the HTTP request.
06-http-request-canceled

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugIssue contains a bug related to a specific component. Something about the component is not working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions