Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

UNIX timestamps

Name: Anonymous 2007-12-08 21:33

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: Anonymous 2007-12-08 22:35

GTFO ediktrated newfag

Name: Anonymous 2007-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.

Name: Anonymous 2007-12-17 9:19

>>3
I've seen it happen twice. It is very rare but possible on high-traffic boards such as /b/.

Similarly, on the discussion boards it's actually impossible to have two new threads started in the same second on the same board, beacuse they use Unix timestamps.

Name: Anonymous 2007-12-17 11:51

couldn't you just count the number of images and name them in a base 0-9 a-z ordered?

Name: Anonymous 2007-12-17 15:45

>>5
Or even better, large random number instead of timestamp + 3 digit random number.

Name: Anonymous 2007-12-17 15:53


Don't change these.
Name: Email:
Entire Thread Thread List