Skip to main content
Topic: File upload: prefix function? (Read 927 times) previous topic - next topic

File upload: prefix function?

Hello all,
is there a way to add a function to the prefix file upload field?
This would make file uploading safer (no overvriting same file name).
Example prefix: date(Y-M-d_H-i-s)-

TIA
tony

 

Re: File upload: prefix function?

Reply #1
Hello all I found a solution to add date/time to filename as a prefix.
If you want to do this, just add this line under line 377 of the file libs/Uploader.php:
$string = date('Y-m-d_H-i-s')."-".$string;

Obviously you have to do this every time you republish your project.
To make this permanent, you shoud edit the file Uploader.php in
C:\Program Files (x86)\PHPRad Classic\Components\Bootstrap-4\systemframework\libs

This way, when you republish your project, the new file will be uploaded.
HTH
tony