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

Confusing progressbar behaviour on upload error #1854

Open
11 of 16 tasks
anesvetaevtrackad opened this issue Jan 26, 2024 · 2 comments
Open
11 of 16 tasks

Confusing progressbar behaviour on upload error #1854

anesvetaevtrackad opened this issue Jan 26, 2024 · 2 comments

Comments

@anesvetaevtrackad
Copy link

anesvetaevtrackad commented Jan 26, 2024

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
@kartik-v
Copy link
Owner

This should not be the case normally - as the plugin shows the error progress template when error is encountered generally. Can you mention the configuration and your specific use case which can be reproduced (a JS BIN example)?

@anesvetaevtrackad
Copy link
Author

@kartik-v Hello, sorry for long answer

Here is a link: https://jsbin.com/woyamicoki/edit?html,js,output

I've taken an example code from docs https://plugins.krajee.com/file-input#usage-step-1
And added some dummy url as uploadUrl setting.

When I upload the file, of course it fails, but the "Done" line is green.

I specially reproduced it like this, because my actual website uses the older version and it's customized, so I've decided to make a simple example, to not go into much details.

P.S. I think there is smth wrong with docs - I needed to replace buffer.min.js and filetype.min.js with unminified versions to get the example working.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants