Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileUpload: Files labeled as completed even when upload failed #5738

Open
GreenBattery opened this issue May 14, 2024 · 0 comments
Open

FileUpload: Files labeled as completed even when upload failed #5738

GreenBattery opened this issue May 14, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@GreenBattery
Copy link

Describe the bug

The FileUpload component reports files as 'Completed' even when the upload fails.

Furthermore, the developer seemingly has no mechanism available to manually change the label of the file even if they detect the failed upload.

See an example: https://stackblitz.com/edit/primevue-create-vue-issue-template-4ttdpc?file=src%2FApp.vue

In the set up above, the upload url is set to 'example.net' which causes the browser to reject the upload due to cross-origin request restrictions.

The status of the component should be controllable by the developer at least, and ideally, should reflect an error if the upload failed.

Reproducer

https://stackblitz.com/edit/primevue-create-vue-issue-template-4ttdpc?file=src%2FApp.vue,package-lock.json

PrimeVue version

3.52.0

Vue version

3.x

Language

ES6

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Select or drop any image file onto the upload component.
  2. hit the 'Upload' button
  3. Inspect the developer console and confirm that the upload failed.
  4. Observe that the FileUpload component reported the file as completed

Expected behavior

A failed upload should not mark the file as completed.

The status of the component should be controllable by the developer at least, and ideally, should reflect an error if the upload failed.

@GreenBattery GreenBattery added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant