How to display file size and additional buttons in the widget Kartik-v YII2 FileInput?

I can not get this result:
Ie need to display a button drag the button to open preview and file size.
In the first demo , everything works out of the box, no extra settings, the author does not - and everything works "as it should".
In fact, it turns out:
I think it's in the templates. Trying to change the template to:
'layoutTemplates' => [
 'size' => '<span>{sizeText}</span>',
 'footer' => '<div class="file-thumbnail-footer">
 <div class="file-caption-name" style="width:{width}">{caption}{size}</div>
 {progress} {actions}

And get this:
The uploading of pictures goes with a Bang, left to do "beauty", but something I can not understand CANT?
July 8th 19 at 16:46
1 answer
July 8th 19 at 16:48
Here everything is painted in detail:
Specifically size :
echo FileInput::widget([
 'name' => 'attachment_49[]',
 'pluginOptions' => [
 'initialCaption'=>"The Moon and the Earth",
 'initialPreviewConfig' => [
 ['caption' => 'Moon.jpg', 'size' => '873727'],
 ['caption' => 'Earth.jpg', 'size' => '1287883'],
My example for a php widget, not for js code, theoretically it can generate js from Your. It is necessary to disassemble the widget and watch. Yes, it is wraper to the bootstrap-fileinput ovskogo, but not the fact that there's no additional dependencies, same structure and same whether version. - Henderson_Beat commented on July 8th 19 at 16:57
Yes, in that case, I have tried php and js versions, I can not achieve a result as the author of the demos. - grady.Nad commented on July 8th 19 at 17:00
Here when you insert a new file showing the file size and zoom button. Moreover, no additional configuration is specified. And here I mimic the default settings:, and as you can see neither the size nor zoom no. The problem is, will not prompt? - grady.Nad commented on July 8th 19 at 16:51
Here's your example, generally not working as expected. What's wrong, I can not understand. Anywhere there is no adequate explanation. - grady.Nad commented on July 8th 19 at 16:54
: Yes, there's a weird docks. Usually use (like fileinput) or mega easy solution either - Henderson_Beat commented on July 8th 19 at 17:03

Find more questions by tags Yii