A
A
Artur2018-12-26 15:02:40
Yii
Artur, 2018-12-26 15:02:40

How to upload MultipleInput files in Yii2?

How to upload files in the unclead\multipleinput\MultipleInput extension, just to send files to the controller. Now only file names are sent.
Here is the code in form.php:

<?= $form->field($model, 'plan')->widget(\unclead\multipleinput\MultipleInput::className(), [
                //'max' => 4,
                'columns' => [
                    [
                        'name'  => 'planImage',
                        'title' => 'Картинка плана этажа',
                        'type'  => 'fileInput',
                        
                    ],
                    [
                        'name'  => 'planRange',
                        'title' => 'Диапозон этажей',
                        
                        'enableError' => true,
                        'options' => [
                            'class' => 'input-priority'
                        ]
                    ]
                ]
            ]);
        ?>

5c236d7b2c007707736206.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaliy Orlov, 2018-12-26
@orlov0562

Open the html of the page and make sure you have a multipart/form-data form
or developer console and see what type of form is submitted

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question