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

Hi I have issue when choose image for upload (overwriteInitial= false) if I choose image one by one image data it's have only one .Example in this video. https://share.vidyard.com/watch/VgoAkRBNXoZhJCwM8pwCYP? #1830

Open
18 tasks
modlenine opened this issue Jan 27, 2023 · 1 comment

Comments

@modlenine
Copy link

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

Expected behavior and actual behavior

When I follow those steps, I see...

I was expecting...

Environment

Browsers

  • Google Chrome
  • Mozilla Firefox
  • Internet Explorer
  • Safari

Operating System

  • Windows
  • Mac OS X
  • Linux
  • Mobile

Libraries

  • jQuery version:
  • bootstrap-fileinput version:

Isolating the problem

  • This bug happens on the plugin demos page
  • 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
@modlenine modlenine changed the title Hi I have issue when choose image for upload (overwriteInitial= false) if I choose image one by one image data it's have only one .Example in this video. Hi I have issue when choose image for upload (overwriteInitial= false) if I choose image one by one image data it's have only one .Example in this video. https://disq.us/url?url=https%3A%2F%2Fshare.vidyard.com%2Fwatch%2FVgoAkRBNXoZhJCwM8pwCYP%3F%3A_sKlmhboWXuHJV4HKbwegcaqYvM&cuid=2826770 Jan 27, 2023
@modlenine modlenine changed the title Hi I have issue when choose image for upload (overwriteInitial= false) if I choose image one by one image data it's have only one .Example in this video. https://disq.us/url?url=https%3A%2F%2Fshare.vidyard.com%2Fwatch%2FVgoAkRBNXoZhJCwM8pwCYP%3F%3A_sKlmhboWXuHJV4HKbwegcaqYvM&cuid=2826770 Hi I have issue when choose image for upload (overwriteInitial= false) if I choose image one by one image data it's have only one .Example in this video. https://share.vidyard.com/watch/VgoAkRBNXoZhJCwM8pwCYP? Jan 27, 2023
@horsebuzz
Copy link

Same is happening with me as well.

Following is my fileinput code

$("#emailAttachments").fileinput({ overwriteInitial: false, preferIconicPreview: true, theme: "fa4", showUpload: false, maxFileSize: 5120, ajaxDeleteSettings: { beforeSend: function (xhr, settings) { xhr.setRequestHeader("X-CSRF-TOKEN", $('meta[name="csrf-token"]').attr('content')); } }, mergeAjaxDeleteCallbacks: true, maxFileCount: 10, allowedFileExtensions: ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx'] }).on('filedeleted', function () { setTimeout(function () { window.alert('File deletion was successful! '); }, 900); });

I have deduced that the problem is in _hasInitialPreview functions self.previewCache.count(true) method. Line 3319

It returns 0 where I believe it should return number of already uploaded/previewed file.

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

No branches or pull requests

2 participants