We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I would like to use this tool in Yii2, but unfortunately I get the following error:
Exception 'yii\base\InvalidArgumentException' with message 'Response content must not be an array.'
Appropriate rights in the controller for "upload" have been granted.
My files look like this:
Controller.php public function actionUpload() { return [ 'uploadPhoto' => [ 'class' => 'budyaga\cropper\actions\UploadAction', 'url' => '/images/news', 'path' => '@frontend/web/images/news', ] ]; }
public function actionUpload() { return [ 'uploadPhoto' => [ 'class' => 'budyaga\cropper\actions\UploadAction', 'url' => '/images/news', 'path' => '@frontend/web/images/news', ] ]; }
form.php <?php echo $form->field($model, 'pictureFile')->widget(Widget::className(), [ 'uploadUrl' => URL::to(['news/upload']), ]) ?>
<?php echo $form->field($model, 'pictureFile')->widget(Widget::className(), [ 'uploadUrl' => URL::to(['news/upload']), ]) ?>
The text was updated successfully, but these errors were encountered:
<?php echo $form->field($model, 'pictureFile')->widget(Widget::className(), [ 'uploadUrl' => Yii::$app->urlManagerBackend->createUrl('uploads'), ]) ?>
Sorry, something went wrong.
No branches or pull requests
Hello, I would like to use this tool in Yii2, but unfortunately I get the following error:
Exception 'yii\base\InvalidArgumentException' with message 'Response content must not be an array.'
Appropriate rights in the controller for "upload" have been granted.
My files look like this:
Controller.php
public function actionUpload() { return [ 'uploadPhoto' => [ 'class' => 'budyaga\cropper\actions\UploadAction', 'url' => '/images/news', 'path' => '@frontend/web/images/news', ] ]; }
form.php
<?php echo $form->field($model, 'pictureFile')->widget(Widget::className(), [ 'uploadUrl' => URL::to(['news/upload']), ]) ?>
The text was updated successfully, but these errors were encountered: