Reputation: 19743
In my custom component, I am using the following code to bring the Media Manager popup:
JToolBarHelper::media_manager('directory', 'Upload');
"directory" obviously sets the default directory that will appear when the button is clicked, which it does, but when I go to upload an image, it uploads to the standard "images"
folder rather than images/directory
.
I have looked around Google and the majority of pages say that it was a bug in Joomla 1.5 which I assume was fixed in Joomla 2.5. Is there another way to get the default directory working?
Upvotes: 0
Views: 356
Reputation: 5615
media_manager invokes with folder= and the directory you passed. But it expects the path below your images folder.
So if your folder is
/images/uploaddir
you would invoke it with
JToolBarHelper::media_manager('uploaddir', 'Upload');
Upvotes: 1