Forum Moderators: coopster
So what I want is that, my every file should have a unique name so that it cannot be overwrite or replace by the another file upload to this foler. All my files uses jpg extensions.
Waiting for your kind response.
Thanks in advance.
Best Regards..
Unfortunately, but an advantage in this case, time always marches forward.
A second option is if it ever gets large, you will need some scheme to make sense of it. Address it now before it does. In a member based scenario,
/images/members/12345
where 12345 represents the member's id. Then you can just extract the uploaded file name and use what they have uploaded.
In this case, simple do a check for file exists on upload. Foreseeing potential problems, you can have a checkbox on the form: "Overwrite this file if it already exists." If unchecked and exists, return to upload form with the error, if not checked, just let it overwrite.