Jump to content

How can i make folders with auto incrementing int names?


AEllerbrock

Recommended Posts

I'm building a website in which the user can upload 3 photos of the same product (from different angles). what i want is that the user only selects those 3 iamges, writes a description and when they press upload the system creates an album named "1" with the 3 images in it. the next time the new folder name will be "2"

 

I tried storing them on a mysql database but i read it makes it too heavy and the queries take longer. so i'll just save the path there. thanks!

Does the client Log In?

 

I would suggest that you create a folder for each client in your image folder.  Then create a new unique name for the image (be careful of collisions).  Maybe a random string, then hashed.  Insert the file name into the database, tying it back to the user's table. 

 

If you put 3 images into each folder, that would create a mess of folders, I would keep them all in one.

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.