I think the order is important:?

//
http://www.zfforums.com/zend-framework-components-13/core-infrastructure-19/zend-form-element-file-rename-working-but-question-1940.html
* Check if the file was uploaded
* Check if the file is valid
* Add the filter
* Receive the file

Dan





2009/12/21 Diego Potapczuk <[email protected]>

> Hi,
>
> I need to rename a file with the id of a record that i'm saving in the same
> form, so in the controller i already checked if it is a post, if the data is
> valid, already saved my record in the database, and now i have the id. So i
> need to check if the file was submitted and rename it. I tried it without
> luck.
>
>         /* @var $file Zend_Form_Element_File */
>         $file = $form->file;
>         if($file->isUploaded()){
>             $file->addFilter('Rename', array('target' =>
> realpath('..\public\contents').'\\'.$id,
>                          'overwrite' => true));
>             $file->receive();
>         }
>
> The receive execute the filter? How can i execute it?
> How could it perform this?
> How to get the extension of the file?
>
>
> ::: Diego Potapczuk
>

Reply via email to