-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Method to count all current select files #731
Comments
The plugin can only give you client side data... for server side uploaded files - you need to write your logic to calculate the count of files successfully uploaded. |
Yes, I need only client side data, exactly like your |
This is based on |
The solution could be a sort of public method like this: var count = $("#input-id").fileinput("getFilesCount"); available inside the |
I'm using only ajax for upload and delete and I need a method to count all current selected files (both uploadable/deleteable and already uploaded but without errors). Upload is triggered with the
filebatchselected
event right after files are selected.If I use
$input.fileinput("getFileStack")
I don't get the value I expect, as documentation says:Shortly, I need a method similar to that one you already use to populate
initialCaption
inside the<div class="file-caption-name"></div>
-previewCache.count(self.id)
- to update thediv#stack-size
with the files count after every upload/delete action, but I can't find anything like that in documentation.My config with yii2:
The text was updated successfully, but these errors were encountered: