yii2 advanced integrates wangEditor and uploads pictures for 400 yuan.
< /p>
< /p>
< /p>
I encountered 400 before saying it was because of csrf, but the hidden field code has been added
<input type="hidden" id="_csrf" name="_csrf-frontend" value="<?php echo yii: :$app->request->csrfToken; ?>" />
世界只因有你2017-05-16 13:11:02
Try to disable it when adding public $enableCsrfValidation = false;
or init() to the corresponding controller. If it works, it means you wrote the wrong CSRF token hidden field when adding it.
漂亮男人2017-05-16 13:11:02
You can try changing your hidden domain to something like this
<input type="hidden" name="_csrf" value="<?php echo yii::$app->request->csrfToken; ?>" />