primevue icon indicating copy to clipboard operation
primevue copied to clipboard

FileUpload: The user cannot really abort uploading files

Open forNoor opened this issue 9 months ago • 0 comments

Describe the bug

Hi, thanks for the FileUpload Component. If the user wants to upload large files, you fill formData for all the files and use the XMLHttpRequest send function to post data files to the server. If the user wants to cancel, they can only remove an item, but they cannot cancel the file posting process to the server. I think you must do two things to complete the component's functionality. First, you must use a separate XMLHttpRequest for each file, not one for all files. Second, when the user cancels the uploading process, the corresponding XMLHttpRequest should be aborted. In this scenario, the progress of uploading each file could be different from others.

Reproducer

https

PrimeVue version

3.52

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. select multiple large files
  2. press upload files
  3. clear uploads.

in this case, the list is cleared but posting files continues. and user can not abort one uploading process.

Expected behavior

No response

forNoor avatar Apr 27 '24 05:04 forNoor