I want to change uploading file name. Below is the code I have written:
$upload = new Zend_File_Transfer_Adapter_Http();
$upload->setDestination(IMAGE_PHY_PATH);
try {
//upload received file(s)
$upload->addFilter('Rename', array('target' => IMAGE_PHY_PATH."1.jpg",
'overwrite' => true));
$upload->receive();
} catch (Zend_File_Transfer_Exception $e) {
$e->getMessage();
}
Can anyone tell me what is wrong with my code?