I use iBrowser to upload images into TinyMCE editor. It uses ilibs_dir config param to set folder where images will be stored. I would like to integrate it with my site that has many users. How can i set different folder of each users? I have my user ID stored in $userId value in my PHP script that emits the TinyMCE editor.
I use iBrowser to upload images into TinyMCE editor. It uses ilibs_dir config param
Share
You should not create a different folder for each user, but instead let PHP manage it. You could/should store the images in 1 folder, and save it to a MySQL database which image is from which user. Then when TinyMCE requests an image, let php check if the user owns that image, and if so, give it.
The image list you can supply to TinyMCE can also be created by PHP, and supply the image list in JSON list to TinyMCE ( http://www.tinymce.com/wiki.php/Configuration:external_image_list_url )
This way you have total control over the images, and it is also much more secure.
edit: Got an example for you how to create the list with PHP:
This outputted file should be included in the website through a script file as a JavaScript file.