The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Rename uploaded file - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Rename uploaded file (/showthread.php?tid=692) |
Rename uploaded file - zoltandragon - May 10th, 2010 Hi, I would like to ensure that all the uploaded files are using a specific array (Firstname.Familyname.MAT.2010.spring) before the file extension, and this array is figured out from the fields/labels of "First Name", etc. (stripping all special characters, just to make sure). Can it be done? I suppose move_uploaded_file would do it, but I do not know where I can set it. Thanks anyone for any help in advance! Zoltán RE: Rename uploaded file - Ben - May 15th, 2010 Hi Zoltan, Sorry for taking so long to get back to you. I ended up going down the rabbit hole looking for a solution using a code hook, but turns out it couldn't work. I'm afraid that this will need to be an actual core update - but it's a very reasonable one, so I think I'll include it in 2.0.2. Right now, you can customize certain aspects of the uploaded file: max file size, location and acceptable file types. I'll add a feature like the Export Manager has for the generated files that allows you to enter placeholders to define the uploaded filename. But in the meantime, I'm afraid you're stuck with what's there. Sorry about that! - Ben RE: Rename uploaded file - zoltandragon - May 15th, 2010 Dear Ben, Thanks very much for looking into the problem - I will be waiting for this feature, patient as ever ![]() Best, Zoltán |