Hi all, Thomas,
I'm going further in my testing of Zend_Form + Zend_File_Transfert and
I have to say "I'm going too love it", very nice, make things really smooth.
But for now I'm facing an other issue :
Thomas I saw on your blog
(http://www.thomasweidner.com/flatpress/2008/11/01/file-transfer-hashing-and-other-news/)
that you use Zend_Form::getTransferAdapter() but this method is not or
not yet present in Zend_Form (in ZF 1.7.1).
So for now I'm calling getTransferAdapter() from one of the form file
element $this->_form->getElement('file1')->getTransferAdapter()
But now if I have several files to upload with different destination
directories and as each form elements seems to have is own
TransferAdapter this line above is not working as expected :
$uploader = $this->_form->getElement('file1')->getTransferAdapter();
if (! $uploader->receive(array('file1' , 'file2'))) {
throw new Exception("Not able to save the files");
}
file1 is save in the right directory while file2 is save in /temp directory
If I do $uploader = $this->_form->getElement('file2')->getTransferAdapter();
file2 is save in the right directory while file1 is save in /temp directory
It seams that is due to the fact than each form elements have is own
instance of TransferAdapter.
Regards,
--
Laurent Melmoux
Conseil et Solutions Web | [EMAIL PROTECTED]
2mx - Annecy, France | http://laurent.2mx.fr/