Sorry, the code $upload->addFilter('cba.js',true) incorrect. it should be $upload->addFilter('rename',array('cba.jpg', true));
2008/9/11 Jacky Chen <[EMAIL PROTECTED]> > Hi guy, > > Let's say that i want to rename the upload file abc.jpg to cba.jpg just > after the file is complete upload in the form,how can i add the rename > filter to the form? > of course,i can add the filter like this $upload->addFilter('cba.jpg', > true) if i know that the file that would be upload is a jpg file,but problem > is,i don't know what type file would be upload,may be jpg,gif,pdf,or > zip,etc. > And i found that the file rename filter doesn't deal with the file > extension. > > Sorry for my poor english.Thanks. > > Best Regards. >