Jump to content

Temporary Upload Files Ever The Same


HokieTracks

Recommended Posts

Hi, I was not too sure where this topic should go so sorry if it is in the wrong forum. But, I have a code for users to upload avatars. But, I don't want a user accidentally overwriting another users avatar. So I was thinking that instead of using the original file name I could use the temporary file name when I move it. So, are temporary file names ever the same?

Link to comment
https://forums.phpfreaks.com/topic/160313-temporary-upload-files-ever-the-same/
Share on other sites

could always save the file as username_timestamp.(gif|jpg|bmp) can't get more unique then that..

 

I do something similar with the users on one of my sites, kept running into issues with people uploading stuff with ' or other char's unacceptable so I just started saving there uploaded files to there user name and either a timestamps, or there session identifier or something. In the end, its something that I cant foresee anyone ever running into the same file name more then once.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.