primevue
primevue copied to clipboard
FileUpload: The user cannot really abort uploading files
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
- select multiple large files
- press upload files
- 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