Open modlenine opened 1 year ago
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.
Prerequisites
master
branch of bootstrap-fileinput.Steps to reproduce the issue
1. 2. 3.
Expected behavior and actual behavior
When I follow those steps, I see...
I was expecting...
Environment
Browsers
Operating System
Libraries
Isolating the problem