I use Kartik file input in the yii2 framework I want to implement a batch upload of photos with the ability to remove some photos BEFORE they are loaded, here's the code
<?= $form->field($model, 'imageFiles[]')->widget(FileInput::classname(), [ 'options' => ['accept' => 'image/*','multiple' => true], 'pluginOptions' => [ 'uploadUrl' => Url::to(['/site/upload']), 'uploadExtraData' => [ 'album_id' => 20, 'cat_id' => 'Nature' ], 'maxFileCount' => 10 ] ])->label('') ?> I understand that you need to save pictures in the Site controller in the upload method, but I don’t understand how to catch them there via POST only this comes
'album_id' => 20, 'cat_id' => 'Nature' Can someone help?
phpcalled$_FILESthat’s where all the info about the uploaded files is caught ....... php.net/manual/ru/reserved.variables.files.php ...... php.su/ phphttp /? uploads ......... htmlweb.ru/php/function/$_files.php - Alexey Shimansky