Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Simpy can't upload image #138

Open
TomaIvanovTomov opened this issue May 5, 2019 · 3 comments
Open

Simpy can't upload image #138

TomaIvanovTomov opened this issue May 5, 2019 · 3 comments
Labels

Comments

@TomaIvanovTomov
Copy link

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
Copy link
Member

@danielrodcaball
Copy link

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
iutbay/yii2-kcfinder#8 (comment)

@KateKati
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants