Answer the question
In order to leave comments, you need to log in
[[+content_image]]
How to upload and process files without ActiveForm?
Good evening, I encountered the following problem:
1. I am uploading a file via ajax, but according to the classical scheme:
в моделе:
public $image;
..
rules:
[['image'], 'file', 'extensions' => 'png, jpg']
$data = \Yii::$app->request->post();
$model->attributes = $data; // не load потому что у меня не activeForm и не вложенный массив post
$model->validate -> error "image cannot be blank"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question