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
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.
Related
I want to set my wordpress files to upload to /home/public_html/images instead of /wp_content/uploads, I have gotten to the point that it gives me the correct url for /home/public_html/images but I have to move the new files from /wp_content/uploads to /home/public_html/images for it to work
I have tried changing the upload path in wp-options.php but that just makes a subdirectory in my sites folder called public_html and puts the image there instead of actually putting it in /home/public_html/images
Try going to the wp_config.php file and adding this line of code:
define('UPLOADS', 'images');
This should put the images in a folder under /public_html instead of the typical /wp_content folder.
https://developer.wordpress.org/apis/wp-config-php/#moving-uploads-folder
-- Images
-- Project Folder assign in url web (ex : abc.com)
Try to access path file in Images like "/../Images/ABC.png" but the url in web becomes abc.com/Images not assign folder images outside project folder.
So, can someone help how to access the folder images outside?
Just create a folder in codeigniter root directory.
An example: I created a folder called "assets" inside codeigniter & upload a image in this folder. Image name is photo.jpg.
Now you can use in view. So base_url automatically replace with your website url.
Note: Must enter your website base_url in app.php
I'm using Laravel 4.1. I put phpgrid into the vendors directory. Here are my paths using example domains:
Actual file path to website root: /home/.../htdocs/dashboard/public
Actual file path to phpgrid: /home/.../htdocs/dashboard/vendor/phpgrid
The (example) url to the site is: http://www.site1.com/dashboard/
The SERVER_ROOT is set to: http://www.site1.com/dashboard/vendor/phpgrid
phpgrid works when I use that domain. The problem is that I want to use a shorter domain with masking. So the url I want to use is something like: http://dashboard.myotherdomain.com/, and the virtual host has it pointing to the actual file path to the website root directory above. phpgrid builds the table, but then the AJAX fires and can't get to the vendor directory because it is now below the site root of the masked domain. I thought it would use the absolute path, but it doesn't seem to. Any ideas?
It turns out that the issue was with the AJAX calls. AJAX will not let you call a different domain for security reasons, so setting the SERVER_ROOT to a different domain than my masked domain was failing (silently btw, blank error message in phpgrid). So I was forced to move the phpgrid files and folders into the webroot and change the SERVER_ROOT to a relative path.
A simple fix although I would have preferred to keep the files in the vendor directory.
public_html/(root)index.php
/image/123.jpg
/subdomain(root)/upload.php
I have file upload.php can upload image, this file is locate in sub-domain folder (I have set sub-domain folder as another root)
I need to upload image to main domain, /image/ (image's folder)
however I could not find the right path. I have try ../ but it wont work above the root
anyone know how to solve this problem?
Use path like /home/content/html/images
I have a joomla component that fetches the audio songs from the music folder on the server and plays them in the front end. And the users can upload their songs from the front end.
But the problem is that, the component settings are such that the music folder path must be outside of the web root.
The path looks like:
/home/username/public_html/audio
But i am confused how to upload the files to a location inside 'public_html' folder, using php. What should be the destination address that i can use in my code?
To get the server path in the Joomla environment:
echo JPATH_SITE;
Examples of usage