I think you need to invovle Zend_File_Transfer somewhere. Could you check
this blog post
http://ahsangill.wordpress.com/2009/02/17/zend-framework-file-upload-using-zend_form_element_file/,
it helped me out when I had to do a file upload.

Regards,
Ukang'a Dickson


On Fri, Aug 6, 2010 at 9:19 PM, zensys [via Zend Framework Community] <
[email protected]<ml-node%[email protected]>
> wrote:

> I try to upload a file to a directory using setDestination but the file
> ends op in /tmp, whatever I try. Here's my code:
>
> class forms_ImportForm extends Zend_Form {
>
>      public function __construct($options = null) {
>           parent::__construct($options);
>           $this->setName('import');
>
>           $uploadFile = new Zend_Form_Element_File('extract');
>           $uploadFile->setLabel('File') ->setDestination(APPLICATION_PATH
> ."/../data");
>
>           $submit = new Zend_Form_Element_Submit('submit');
>           $submit->setLabel('Uploaden');
>
>           $this->addElements(array($uploadFile, $submit));
>     }
> }
>
> The method is called because the label is displayed and if I mutilate the
> file location I get an error. Any suggestions greatly appreciated.
>
> Timmo
>
>
>
> ------------------------------
>  View message @
> http://zend-framework-community.634137.n4.nabble.com/setDestination-in-Zend-Form-Element-File-tp2316644p2316644.html
> To unsubscribe from Zend Framework Community, click 
> here<http://zend-framework-community.634137.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=dWthbmdhQGdtYWlsLmNvbXw2MzQxMzd8MTM1MjIyNjI4Mg==>.
>
>
>

-- 
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/setDestination-in-Zend-Form-Element-File-tp2316644p2316653.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to