bs-custom-file-input icon indicating copy to clipboard operation
bs-custom-file-input copied to clipboard

Display number of items instead of their name on multiple inputs

Open jtsimoes opened this issue 3 years ago • 2 comments

Hi! Thanks for this plugin, I've been using a lot!

I wonder if, when the input is for several files (multiple), it shouldn't be better to display the number of selected items, instead of showing their names.

Browsers and Bootstrap v5 already do this by default: image


This suggestion came about because I tried to upload files with very large names and an overflow happens. Of course it was easy to solve, adding the CSS property overflow: hidden to the class .custom-file-label, but this way most of the file names are hidden.

image

And since the file names already appear in the title when hovering the input, why not show the number of files uploaded in the input? I think it would be more useful!

jtsimoes avatar Dec 27 '20 15:12 jtsimoes

You can even make it configurable to please everyone (by a parameter on init(), for example)

jtsimoes avatar Dec 27 '20 15:12 jtsimoes

Hello, have you found a way around this?

keremnymn avatar Jan 12 '21 17:01 keremnymn