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; ?>" />
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.You can try changing your hidden domain to something like this