How to recive file using form field with type: "file"? - Joomla! Forum - community, help and support
i write component images rendering (simple gallery), , part of - posibility upload files using administration panel.
i have form - jgallery.xml with:
and extended jcontrollerform receive file , place in dedicated folder:
but problems are:
inside $input have just: jform[itemname] => filename.and
standart php array $_files empty.
i read topic: viewtopic.php?f=231&t=344063 , adding of enctype="multipart/form-data" form totaly vanish jform[itemname] $input structure, parameter not passing.
also saw solution: http://docs.joomla.org/creating_a_file_ ... _component, on need. need simple - have access temporary file uploaded web server move component's media directory.
i have form - jgallery.xml with:
code: select all
<field
name="itemname"
type="file"
required="true"
label="com_jgallery_jgallery_field_file_label"
description="com_jgallery_jgallery_field_file_desc"
size="40"
/>
and extended jcontrollerform receive file , place in dedicated folder:
code: select all
class jgallerycontrollerjgallery extends jcontrollerform
{
public function save($key = null, $urlvar = null)
{
$input = jfactory::getapplication()->input;
// code
return parent::save($key, $urlvar);
}
}
but problems are:
inside $input have just: jform[itemname] => filename.and
standart php array $_files empty.
i read topic: viewtopic.php?f=231&t=344063 , adding of enctype="multipart/form-data" form totaly vanish jform[itemname] $input structure, parameter not passing.
also saw solution: http://docs.joomla.org/creating_a_file_ ... _component, on need. need simple - have access temporary file uploaded web server move component's media directory.
Comments
Post a Comment