I am using tinymce in my project with the justboilme plugin so that I could save images in a certain location on the server. In the config file, I did the following and worked fine:
$config['img_path'] = 'public/photos'; // Relative to domain name
$config['upload_path'] = $_SERVER['DOCUMENT_ROOT'] . $config['img_path']; // Physical path.
The questions is, If I have multiple folders to save my files on the server side (users, projects...etc) How can I dynamically change the config so that the file get uploaded in the correct directory.
Example:
- Uploading user photo -> gets uploaded in users folder
- Uploading project photo -> get uploaded in projects folder
Is that possible?