Search code examples
phphtmluploadckeditorckfinder

image uploads in ckfinder but not showing in ckeditor


As i upload using ckfinder the file/image uploads in the defined folder, but it return a url to ckeditor, using the url the image is not loading in ckeditor, i dont know why, am working in the localhost,

my config is as follows-

baseUrl = "/var/www/html/WC/joseph/plugins/ckfinder/userfiles/"

the ckfinder returns the same url to ckeditor, but it doesnt loads image with http://localhost the image loads,

but i cant able to change the config as locahost, when i change it then the upload doesn't works, anyone plzz help me


Solution

  • The baseUrl option, like you can guess from the name, is used to define a base URL. It looks like you have passed to it a path of the physical directory on your server, which is incorrect. Instead, you should put there the URL which points to userfiles folder location.

    Basing on directory path from your question let's assume that your website is available under https://example.com domain, and the root folder for this domain is served from /var/www/html/WC/ directory. In this case you should define baseUrl as follows:

    baseUrl = "https://example.com/joseph/plugins/ckfinder/userfiles/"
    

    CKFinder will know how to build URL-s for files which should resolve the issue.