phpckeditorkcfinder

CKEditor and KCfinder image preview on GoDaddy


I am having a problem with preview of image through KCFinder on CKEditor on GoDaddy hosting.

When I select the image from KCFinder the preview is loaded correctly on my local machine, but when I check on GoDaddy it is not showing correctly. Difference can be seen from below images.

I have configured the file browser in CKEditor as shown in below snippet.

config.filebrowserBrowseUrl = '../admin/kcfinder/browse.php?type=files';
config.filebrowserImageBrowseUrl = '../admin/kcfinder/browse.php?type=media';
config.filebrowserFlashBrowseUrl = '../admin/kcfinder/browse.php?type=flash';
config.filebrowserUploadUrl = '../admin/kcfinder/upload.php?type=files';
config.filebrowserImageUploadUrl = '../admin/kcfinder/upload.php?type=media';
config.filebrowserFlashUploadUrl = '../admin/kcfinder/upload.php?type=flash';

And the KCFinder session is as follows

$_SESSION['KCFINDER']['uploadURL'] = "../upload";
$_SESSION['KCFINDER']['uploadDir'] = "../upload";
$_SESSION['KCFINDER']['disabled'] = false;

Image preview in my localhost.

Image on local machine

Image preview on GoDaddy hosting

enter image description here

The main problem I am unable to get the "upload/" directory in URL. You can see the difference in above images.

Can anyone help, how to resolve this problem?

Thanks in advance.


Solution

  • I used the absolute path for the uploadURL and it worked!