Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CreateUUID for images 4

Status
Not open for further replies.

jimmyshoes

Programmer
Jun 1, 2008
132
GB
I am embarking on a web app which allows users to store profiles of themselves. Each profile can have up tpo 10 images. When a user uploads an image, I plan to convert it's filename using CreateUUID().All images for all users will be stored in an images directory.

Will this be enough to ensure that all image names are unique or is there a better approach? Maybe each user should also have their own images directory?
 
Why not name each image userID01, 02,03.... you already know the user id is unique.

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
You could have an images table and name the image the imageID and have a userID in the table then you could query the userid to find all images for the user.
 
This is late, I know...
but why not just use <cffile action = "upload" nameConflict="makeUnique">

if the user uploads an image named "me.jpg" which already exists this setting will rename the image to me1.jpg automatically.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top