File Storage/Naming
I'm having to store images that are submitted when an order is placed on this particular system. The files come in with a temporary '^php[A-Za-z0-9]{6}$' name which I'm using, temporarily, before the images are moved to a DATETIME stamped directory to live for the rest of their virtual lives.
How random is the random temporary filename, and could it be used straight across to store files? Failing that, what method do you prefer for coming up with random filenames? I could go with the order number, but then that leaves me with having to serialize the images if there are more than one and it just gets messy. I'm tracking the images and the orders they're associated with by using a foreign key in the images table that stores their names.
TIA for any feedback.
How random is the random temporary filename, and could it be used straight across to store files? Failing that, what method do you prefer for coming up with random filenames? I could go with the order number, but then that leaves me with having to serialize the images if there are more than one and it just gets messy. I'm tracking the images and the orders they're associated with by using a foreign key in the images table that stores their names.
TIA for any feedback.
