File Upload with custom Filename

Yue_Hong 18 Dec, 2009
Hi,

How can I have the file upload with custom filename? I want the uploaded file to be renamed, with the name contains the variable that is generated in "On Submit code - before sending email". How can I achieve that? Thanks.
GreyHead 18 Dec, 2009
Hi Yue_Hong,

Unfortunately the File Upload code runs before the OnSubmit Before code so that only way I can think of to do this is to rename the file in the OnSubmit Before code. You can do this fairly easily with the Joomla file functions.

Bob
Yue_Hong 18 Dec, 2009
Thanks for your reply. How is the Joomla file functions? I have google search it, but can't find example of it.
GreyHead 18 Dec, 2009
Hi Yue_Hong,

The page in the Joomla Docs Wiki is here. You may also need the PHP rename() function.

Bob
This topic is locked and no more replies can be posted.