Hi!

I'm trying to use Zend_FIle_Transfer but i have an error when i submit my
form.

I use this code: 
http://www.framework.zend.com/manual/fr/zend.file.html#zend.file.transfer.introduction
http://www.framework.zend.com/manual/fr/zend.file.html#zend.file.transfer.introduction
 


In my_form:

        /*File Field*/
        $photo = new Zend_Form_Element_File('photo');
        $photo->setLabel('Votre Photo')
                ->setRequired(true);


In my Controller

        if($this->_request->isPost()) {
                $formData = $this->_request->getPost();
                if($form->isValid($formData)) {
                                        
                        $adapter = new Zend_File_Transfer_Adapter_Http();
                        $adapter->setDestination('/');
                        
                        if (!$adapter->receive()) {
                            $messages = $adapter->getMessages();
                            echo implode("\n", $messages);
                        }
                } 
        }


and for any picture I upload, $messages return this "The file 'photo' was
illegal uploaded, possible attack "

Thanks for your help! & sorry for my english ;)
-- 
View this message in context: 
http://www.nabble.com/Zend_File_Transfer-tp19024470p19024470.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to