Skip to content

Confusing progressbar behaviour on upload error #1854

Open
@anesvetaevtrackad

Description

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest master branch of bootstrap-fileinput.
  • This is not an usage question. I confirm having read the plugin documentation and demos.
  • This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
  • I have attempted to find the simplest possible steps to reproduce the issue.
  • I have included a failing test as a pull request (Optional).

Steps to reproduce the issue

  1. Create the simpliest bootstrap-fileinput installation (like from docs)
  2. Set dummy uploadUrl to make it work in async mode
  3. Try to "upload" any file

Expected behavior and actual behavior

When I follow these steps, I see flashing error message and then "Done" message in progress bar
image

I was expecting that failed upload will result in failed status in the progress bar.

Yes, if the plugin works with preview enabled, then preview icons are showing errors.
Also, the frame around file is red, it's good.
But progress bar is still green on error.

I find this confusing to users - when the user uploads invalid file, user sees green "Done" progressbar.

Is there any way to show progressbar red with error message, not changing to "Done" right away?
Is it expected behaviour or bug?

I've tried to solve it on my website and eventually I found that it is reproduceable with the simpliest config from docs (I can share it if needed).

Thank you and thank you for a great plugin!

Environment

Browsers

  • Google Chrome
  • Mozilla Firefox
  • Internet Explorer
  • Safari

Operating System

  • Windows
  • Mac OS X
  • Linux
  • Mobile

Libraries

  • jQuery version: 3.6.0
  • bootstrap-fileinput version: 5.5.2

Isolating the problem

  • [?] This bug happens on the plugin demos page - Unable to check
  • The bug happens consistently across all tested browsers
  • This bug happens when using bootstrap-fileinput without other plugins
  • [?] I can reproduce this bug in a jsbin - Upload button doesn't work there

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions