Hi every body,
I have a form in which the user enters a gallery name. I also have a "File Field" which allows him to deposit pictures.
In the list of events I have a "Files upload" who save the photos in a directory.
I want to use the name of the gallery to create the directory dynamically and to save the photos there.
I put the code in a custom code and it's ok :
<?php
$path = 'images/phocagallery/' . $form->data['title'];
$mode='755';
JFolder::create($path, $mode);
?>
But, i really don't know how to put the $path in the "Upload path" of my Files Upload...
i test this but it doesn't work : $form->actions_config[1]['Upload_path'] = $path
I search in the forum but, i really don't find.
Thanks a lot for your help.🙂
Fred
I have a form in which the user enters a gallery name. I also have a "File Field" which allows him to deposit pictures.
In the list of events I have a "Files upload" who save the photos in a directory.
I want to use the name of the gallery to create the directory dynamically and to save the photos there.
I put the code in a custom code and it's ok :
<?php
$path = 'images/phocagallery/' . $form->data['title'];
$mode='755';
JFolder::create($path, $mode);
?>
But, i really don't know how to put the $path in the "Upload path" of my Files Upload...
i test this but it doesn't work : $form->actions_config[1]['Upload_path'] = $path
I search in the forum but, i really don't find.
Thanks a lot for your help.🙂
Fred