P
P
pif_paf_boom2019-10-14 22:07:06
Yii
pif_paf_boom, 2019-10-14 22:07:06

Why is Yii2 multiple file upload not working?

Multiple file upload does not work, namely, you cannot select more than one file. I rarely ask questions, I always try to find the reason myself, but here I could not stand it anymore. Help pzhlst good people :)) (And not very kind people, too, help).
I attach an ActiveForm field with a file upload. Again, the problem is that you cannot select more than one file, the new selected one replaces the previous one, which seems to be strange because multiple is true; By the way, the problem is NOT only with the extension, but also with the standard "fileInput";

<?= $form->field($fileModel, 'images[]')->widget(BootstrapFileInput::className(), [
    'options' => ['accept' => 'image/*', 'multiple' => true],
    'clientOptions' => [
        'previewFileType' => 'text',
        'browseClass' => 'btn btn-success',
        'uploadClass' => 'btn btn-info',
        'removeClass' => 'btn btn-danger',
        'removeIcon' => '<i class="glyphicon glyphicon-trash"></i> '
    ]
]) ?>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question