I managed this code
<pre>
$upload = $this->getElement('file_image');
$upload->addFilter('Rename',$dir->uploads.'myname' . rand() .
'.ext' );
</pre>
but now as I upload type jpg, gif,
png how can I get the extension
dinamically ?
Bye.
thomasW wrote:
>
> Combine the rename filter with a random created name ('myname' . rand() .
> '.ext' ).
>
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
>
> ----- Original Message -----
> From: "whisher" <whisher@mp4.it>
> To: <fw-mvc@lists.zend.com>
> Sent: Saturday, July 11, 2009 4:37 PM
> Subject: [fw-mvc] Zend_File_Transfer set a random name.
>
>
>>
>> Hi.
>> Is it possible to set a random name
>> for the uploaded file ?
>>
>> Bye.
>> --
>> View this message in context:
>> http://www.nabble.com/Zend_File_Transfer-set-a-random-name.-tp24440793p24440793.html
>> Sent from the Zend MVC mailing list archive at Nabble.com.
>
>
>
--
View this message in context: http://www.nabble.com/Zend_File_Transfer-set-a-random-name.-tp24440793p24443101.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论