why do most *chan boards use UNIX timestamps as filenames for uploaded images? if two images are uploaded at the exact same time, the thumbnails for both will be different but they will link to the same image.
wouldn't a random filename or hash work much better?
Name:
Anonymous2007-12-10 11:07
well the filenames aren't unix timestamps per-say, they are appended with 3 random bytes to prevent overwrites. And if the image gets overwriten the thumbnail will be ass well.
If you wanna absolutely prevent overwrites, you could simply name the files by running number and calculate them each time. Another option would be a 20-30 character base64 random string. A hash-function is superfluous. In all my years I've never seen an image overwriten though.