Can someone please kindly explain to me what really happen when you call the function setDestination()? According to the Zend "documentation" both of these should work, however only the first case puts the file where I wanted. The second just ditch it in /tmp
Case 1:
$file = new Zend_Form_Element_File('fileupload');
$file->setDestination('/some/pathsomewhere/');
This works fine, the file will get uploaded to /some/pathsomewhere
Case 2: (after checking isValid($_POST))
$upload = new Zend_File_Transfer_Adapter_Http();
$upload->setDestination('/some/pathsomewhere/');
try {
$upload->receive();
}
no exception. File is ditched in /tmp
I don't understand why the file ends up in /tmp in Case 2 :(