OK I get it, it is an object.
$obj_array = $this->form->getValue('skan');
$file = $obj_array['file_nazwa_orginalna'];
And I can now use all methods from sfValidatedFile
But still this doesn't trigger an error but do nothing:
$filename =
'tomek_'.$file->getOriginalName().$file->getExtension($file->getOriginalExtension());
$file->save(sfConfig::get('sf_upload_dir').'/'.$filename);
2009/2/16 Tomasz Ignatiuk <[email protected]>
>
> This is what I get after values from main form and embeded form are
> bind. The embeded form name="dokument[skan][file_nazwa_orginalna]"
>
> Array (
> [field_1_from_main_form] => blablabla
> [date_from_main_form] => 2009-02-16
> [skan] => Array (
> [file_nazwa_orginalna] => sfValidatedFile Object
> ( [originalName:protected] => Sunset.jpg [tempName:protected] => C:
> \wamp\tmp\phpBC.tmp [savedName:protected] => [type:protected] => image/
> jpeg [size:protected] => 71189 [path:protected] => C:\wamp\www
> \witchcraft\web\uploads/skany ) [ )
>
> How to get to this values with $this->form->getValue()
> I need name,size and type to add them to defferent table
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---