Thanks for reply. It is not this particular case, because I have a
file only in embeded form, not in main form. I don't know if this
matters :(

On 13 Lut, 19:10, Thomas Rabaix <[email protected]> wrote:
> There is a bug in sfForm in this particular case, 
> seehttp://trac.symfony-project.org/ticket/5075
>
> On Fri, Feb 13, 2009 at 6:54 PM, Tomasz Ignatiuk
> <[email protected]>wrote:
>
>
>
>
>
> > Does anyone really tried to do this? Simple upload from embeded form
> > works well, but if I try to do this:
>
> >      $file = $this->form->getValue('file');
> >      $filename = sha1($file->getOriginalName()).$file->getExtension
> > ($file->getOriginalExtension());
> >      $file->save(sfConfig::get('sf_upload_dir').'/'.$filename);
>
> > It says that I try to use getOriginalName on non object. I tried this
> > solution but still it doesn't work:
>
> >http://stereointeractive.com/blog/2008/12/23/symfony-12-upload-a-file...
>
> > My probems are:
>
> > 1. How to get this value $file = $this->form->getValue('file'); if I
> > have a main form called 'document' and embeded form called 'scan' with
> > filename field called 'file_name'. How to get this value?
>
> > 2. Because I keep files information in defferent table I want to set
> > before saving some values:
> > - file size,
> > - file type,
> > - guid that will also be a name of a file on the server
> > - original name
> > - file extensions
>
> > Please help !!!
>
> --
> Thomas Rabaix
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to