I placed the widget in a view, write an action in controller. Everything well - I can choice a photo and preview it. But nothing had happened in console. Only message "Invalid thumb frame with id: ...". That's all. No POST with api/upload-photo or errors.
public function actionUploadPhoto()
{
if (Yii::$app->request->isAjax) {
$id = Yii::$app->request->post('id');
$model = UserProfile::findOne($id);
// this will be something to save an uploaded file
return $this->asJson([true]);
}
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I placed the widget in a view, write an action in controller. Everything well - I can choice a photo and preview it. But nothing had happened in console. Only message "Invalid thumb frame with id: ...". That's all. No POST with api/upload-photo or errors.
View
use kartik\file\FileInput;
Controller