I'm using this file manager for file upload in tinymce. File Manager
Having some problem with the directory. I'm using tinymce 4.
My filemanager folder is in "localhost/BAD/" directory, I have a file named about.php which is in "localhost/BAD/admin/" directory. Now I can upload image and see from that about.php file. My settings of tinymce is
**external_filemanager_path:"/BAD/filemanager/",
filemanager_title:"Filemanager" ,
external_plugins: { "filemanager" : "filemanager/plugin.min.js"}**
And my cofig.php file settings are
$base_url="http://localhost";
$upload_dir = '/BAD/source/';
$current_path = '../source/';
$thumbs_base_path = '../thumbs/';
After uploading image and selecting,it shows a path in the image source box as "../source/eng.jpg" and saved that into database.
But I want to access this image from "localhost/BAD/" directory NOT "localhost/BAD/admin/". It starts to find the source file on 'localhost', Not in 'localhost/BAD'
I tried some changes but not working. How can I save the source link as "source/eng.jpg" instead of "../source/eng.jpg" or is there any way to save the image from one directory and access it from previous level directory?
Solution:
In tinymce init:
relative_urls:false,
external_filemanager_path:"/BAD/filemanager/",
filemanager_title:"Filemanager" ,
external_plugins: { "filemanager" : "/BAD/filemanager/plugin.min.js"}
and in config.php
$base_url="http://localhost";
$upload_dir = '/BAD/source/';
$current_path = '../source/';
$thumbs_base_path = '../thumbs/';