hi
my upload file works fine.
but the attachment comes over with this name
20080415211155_SolutionDesignArchitect.rtf
as you can see, the yeardatetime has been appended to the file name..
how do I get rid of it?
many thnx<br><br>Post edited by: albert, at: 2008/04/16 05:26
my upload file works fine.
but the attachment comes over with this name
20080415211155_SolutionDesignArchitect.rtf
as you can see, the yeardatetime has been appended to the file name..
how do I get rid of it?
many thnx<br><br>Post edited by: albert, at: 2008/04/16 05:26
Hi albert,
I think that ChronoForms does this automatically to handle the case where there are many uploads with the same name.
You can either hack the code, or write some code to rename the file.
The filename change is around line 231 in chronocontact.php
I think that ChronoForms does this automatically to handle the case where there are many uploads with the same name.
You can either hack the code, or write some code to rename the file.
The filename change is around line 231 in chronocontact.php
$filename = date('YmdHis').'_'.preg_replace('`[^a-z0-9-_.]`i','',$_FILES[$allowed_s2[0]]['name']);
Bob
without the date so i change line to :
$filename = preg_replace('`[^a-z0-9-_.]`i','',$_FILES[$allowed_s2[0]]['name']);
Edited to remove quote<br><br>Post edited by: GreyHead, at: 2008/04/18 08:32
$filename = preg_replace('`[^a-z0-9-_.]`i','',$_FILES[$allowed_s2[0]]['name']);
Edited to remove quote<br><br>Post edited by: GreyHead, at: 2008/04/18 08:32
I was able to find this line of code in chronoformuploads.php. It worked to remove the code from there.
-DK
-DK
This topic is locked and no more replies can be posted.