I need to rename a file name while upload in codeigniter, by default it create a file name like sample.png, sample1.png while upload a same file again, but I need to give some authentication to the files uploading with random numbers like 1234_sample.png, 1232_sample.png.
Any way to do this. ?
Thanks in advance.
In your controller BEFORE you run the actual upload code put the following:
As per the CodeIgniter documentation:
This should be put before you run: