2amigos / yii2-ckeditor-widget

CKEditor WYSIWYG widget for Yii2.
https://2amigos.us/open-source/ckeditor-widget
Other
172 stars 112 forks source link

Simpy can't upload image #138

Open TomaIvanovTomov opened 5 years ago

TomaIvanovTomov commented 5 years ago

How to do this ? Please give me some code example. It seems like 90% of the people has the same problem. If I click on browse server - error - you don't have permission to search on the server. If I click on choose file and upload to server after - error - bad request. I tried to make a custom action to upload the image but again - bad request. I am working on LAMP on Ubuntu 18. My code is simple as that:

<?= $form->field($model, 'description')->widget(CKEditor::class, [
     'kcfinder' => true,
     'clientOptions' => [
           'filebrowserUploadUrl' => '/admin/page/upload-image'
      ]
]); ?>

How should I make that GOOD request. And why I don't have permission to look on my own server? I red the whole documentation about the ckeditor. Really don't understand nothing now. Bagging you for real example ...

tonydspaniard commented 5 years ago

Have you tried this? https://github.com/2amigos/yii2-ckeditor-widget#browse--upload

danielrodcaball commented 4 years ago

Maybe it's a little bit late. The problem is with session name, yii2 advanced template put a default session name in both frontend and backend in the file main.php, but kcfincder doesn't know that session name and can't find the configuration established in the session var "KCFINDER". The faster solution is to remove the session name from the app config file, and the tedious one is to set up a SessionSaveHandler, these links will help: https://www.yiiframework.com/wiki/421/syncing-sessions-between-yii-and-kcfinder https://github.com/iutbay/yii2-kcfinder/issues/8#issuecomment-207943362

KateKati commented 4 years ago

do you know, how to install kcfinder in yii? it writes me Setting unknown property: dosamigos\ckeditor\CKEditor::kcfinder still :/