Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AlexanderKim's avatar

CKeditor image upload with laravel

Did someone had success in integrating CKeditor image upload feature with laravel?

0 likes
31 replies
relaxandwork's avatar

@bestmomo I cloned your L5 app, then I copied the ckeditor and filemanager you configured into my app. I am trying to get it to work without sessions for now, so I removed your code in default.config.php under connectors and just simply changed it to return true but the filebrowser doesn't show up the files and it seems like I couldn't upload or create a new folder. What am I missing?

relaxandwork's avatar

Btw, do you do 1 exclusive folder per user or 1 exclusive folder per role? What I will try to achieve next is upon saving a user, they will have their own sub dir for medias.

relaxandwork's avatar

@bestmomo Thanks. I ran through your sample app, I was able to see the process flow and it was able to help me a lot. The only thing missing is to prevent other users from accessing other's folders by changing the exclusive folder query string value to another username. One last question, any ideas how to implement it? Thanks in advance.

relaxandwork's avatar

@bestmomo Hi! Thanks for this. I haven't tried resolving the issue on my own yet. But I will definitely look into your solution. Cheers!

bestmomo's avatar

@relaxandwork I've made a rollback of last commit on my project because there is something with filemanager folder management I must look deeper. I can get filemager working fine with specific folder but there is a bug when inserting image in ckEditor.

relaxandwork's avatar

Hi @bestmomo I actually fetched your commits before, but still having the same issue. When I access the folder of other users, I can still see their files. Or maybe there is something I missed?

relaxandwork's avatar

@bestmomo I tried it again. In my database, there are 2 redactors: greatredactor and slacker. Both of them are with role_id = 2. I logged in as slacker but can still access greatredactor's exclusive folder by pasting something like this on my address bar ( http://localhost:5000/filemanager/index.html?exclusiveFolder=greatredactor&CKEditor=summary&CKEditorFuncNum=1&langCode=en )

Just to clarify, this is not through the popup filemanager window but accessing it directly through browser.

bestmomo's avatar

@relaxandwork I am working on new version now that filemanager issue is solved. I'll tell you when it's done.

relaxandwork's avatar

Hi @bestmomo I made a git pull. It's working now. I will just have to examine on how you did it. I appreciate your help! Cheers!

bestmomo's avatar

@ybazli

Hi, if user is not an admin he is redirected on home page with this url.

so_bhai's avatar

@bestmomo i tried it and its works perfectly in localhost but shows only the loading icon and cannot upload any file or create folder in live server..

so_bhai's avatar

@bestmomo the permissions are okey but it shows only the loading icon where should i need to make change..

bestmomo's avatar

@so_bhai

In filemanager/connectors/php/default.config.php if you return true in auth method :

function auth() 
{
  return true;
}

Does it work ?

bestmomo's avatar

@so_bhai

If you access filemanager directly in its directory with default config (just copy filemanager.config.js.default to filemanager.config.js). Does it work ?

Next

Please or to participate in this conversation.