hi,
I'm trying to rename the uploaded file, but nothing works for me. Do i need
to rename the file before or after upload?. I try to change the name to
"time().jpg", to keep file names unique. After that I want to store file
name in the mysql DB.
I'm using zf 1.7.4
My source:
$element = new Zend_Form_Element_File('g_nuotrauka');
$element->setLabel('Nuotrauka:')
->setDestination(APPLICATION_PATH.'\images')
->addValidator('Count', false, 1)
->addValidator('Size', false, 204800)
->addValidator('Extension', false, 'jpg,png,gif')
->setDecorators($this->_standardElementDecorator);
$this->addElement($element, 'g_nuotrauka');
I tried to use addFilter('Rename') in file element and in my controller, but
nothing worked out.
What i'm dooing wrong?
--
View this message in context:
http://www.nabble.com/How-to-rename-the-uploaded-file-tp22203609p22203609.html
Sent from the Zend Framework mailing list archive at Nabble.com.