Attach the "Rename" file filter to the element.
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com
----- Original Message -----
From: "Peter Smit" <[email protected]>
To: <[email protected]>
Sent: Wednesday, December 30, 2009 12:32 AM
Subject: [fw-general] Random filename when using Zend_Form_Element_File
Hey,
When I am using this in my form
$this->addElement('file', 'file', array(
'label' => 'File to upload:',
'destination' => APPLICATION_PATH.'/../data/uploads',
'multiFile' => 3,
));
I have the problem that all files get their original name. This can avoid
collisions as different people submit forms at the same time, or even
upload
two file with the same name in the same form.
I would like to have a kind of randomized filename instead with a method
to
retrieve the original filename. How can this be done, or how do others
solve
it?
Regards,
Peter Smit
---
+358 44 218 2700