CKeditor image upload with laravel
Did someone had success in integrating CKeditor image upload feature with laravel?
You can look at my L5 example with an integration of Filemanager.
@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 do you return true in auth function of default.config.php ?
function auth() {
return true;
}
@bestmomo yes.
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 I do a folder for each user with his username.
@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 I didn't protect them in my case but look at this page to manage it. Tell me if you get it work, maybe I'll update my project.
@bestmomo Ok will try. Cheers!
@relaxandwork I have updated my project with this commit to securise redactor access to filemanager folder as you wanted.
@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!
@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.
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 I'm surprised because this was ok for me, There is only an issue when I insert an image in CKEditor. I have posted the issue in the github project.
@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.
@relaxandwork I am working on new version now that filemanager issue is solved. I'll tell you when it's done.
Thanks @bestmomo . Looking forward to your new version.
@relaxandwork now it's ok with this commit. Hope all will work for you ;)
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!
hi @bestmomo . when i type /admin returned home page ! why?
Hi, if user is not an admin he is redirected on home page with this url.
@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..
I should try https://github.com/barryvdh/laravel-elfinder
Look at the permissions on your server.
@bestmomo the permissions are okey but it shows only the loading icon where should i need to make change..
In filemanager/connectors/php/default.config.php if you return true in auth method :
function auth()
{
return true;
}
Does it work ?
@bestmomo Again the same problem
If you access filemanager directly in its directory with default config (just copy filemanager.config.js.default to filemanager.config.js). Does it work ?
@bestmomo I have done that but it doesnot work
Please or to participate in this conversation.