Hello!
I'm French so sorry for my English.
I already posted in the ckeditor but instead advised me to come here for my problem.
For me this is ckeditor and ckfinder here: www.mon_site.fr/CMS/
In config.php I therefore:
$baseUrl = 'ckfinder/userfiles/';
$baseDir = '/var/kunden/webs/cedric/CMS/'.$baseUrl.'';
Then in FileUpload.php:
...
$sFilePath = CKFinder_Connector_Utils_FileSystem::combinePaths($sServerDir, $sFileName);
...
if (false === move_uploaded_file($uploadedFile['tmp_name'], $sFilePath))
...
So hopefully it to insert an image enegistre me well and it is as a link:
src="ckfinder/userfiles/images/name_image.jpg"
This link corresponds time we are on the page www.mon_site.fr/CMS
then the link takes us on: www.mon_site.fr/CMS/ckfinder/userfiles/ ... _image.jpg
but if we are on www.mon_site.fr and the image does not appear because the link is: www.mon_site.fr/ckfinder/userfiles/imag ... _image.jpg nonexistent.
Then for such links, when I create a link it gives me:
http:// ckfinder/userfiles/files/anemone13.jpg
Outside this link does not exist!
So I would like to link to images and links is always
src="http://mon_site.fr/CMS/ckfinder/userfiles/images/name_image3.jpg"
I hope you understand me!
Thank you very much in advance!
Cédric
Thu, 07/29/2010 - 18:24
#1
Re: Problem path for upload
Hello!
I Reposte a message, because I feel that my previous message is not very understandable.
Ckeditor and ckfinder are placed in the folder http://www.mon_site.fr / CMS.
The config.php file contains the following:
$baseUrl = 'ckfinder/userfiles/';
$baseDir = '/var/kunden/webs/cedric/CMS/'.$baseUrl.'';
And FIleUpload.php file contains the following:
...
$sFilePath = CKFinder_Connector_Utils_FileSystem::combinePaths($sServerDir, $sFileName);
...
if (false === move_uploaded_file($uploadedFile['tmp_name'], $sFilePath))
...
Here is the picture link added:
<img src="ckfinder/userfiles/images/name_image.jpg" />
So far, so good!
The link image corresponds to http://www.mon_site.fr/CMS/ckfinder/use ... _image.jpg
But if I place this image at this address: http://www.mon_site.fr
The picture link src="ckfinder/userfiles/images/name_image.jpg" will match http://www.mon_site.fr/ckfinder/userfil ... _image.jpg : and this will output nothing because it is a path does not exist .
You understand?
The link created is correct when I'm in the CMS folder but once I'm more the path is incorrect.
So I want to know how to have the image links like this: src="www.mont_site.fr/CMS/ckfinder/userfiles/images/name_image.jpg"
so that the image is displayed on all pages of the sites.
Here I hope you understand better!
Thank you for reading
Cédric
Re: Problem path for upload
If $sServerDir = $this->_currentFolder->getServerPath();
and if $baseUrl = 'ckfinder/userfiles/';
and if $sServerDir = /var/kunden/webs/cedric/CMS/ckfinder/userfiles/images/
where does the "/images/" ?
Because I'd like it back on .... just the other pages "/images/" or "/files/"
Thank you