0

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?

Lodder
  • 19,758
  • 10
  • 59
  • 100
  • http://forum.joomla.org/viewtopic.php?p=2477186 . Also the Joomla 1.5 bug was fixed in 1.5.15 so it definitely shouldn't be an issue in 2.5 – George Wilson Mar 08 '13 at 14:03

1 Answers1

1

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');
Riccardo Zorn
  • 5,590
  • 1
  • 20
  • 36