>>941857>Is it common for websites to generate filenames this way?Yes.
Naming a file after its hash means that every time you save the file, you'll give the same file the same name, which saves space. If your hash is a "secure hash", your users won't be able to game the hash algorithm into producing predictable numbers, which means your files will spread out evenly throughout your directory structure, which is important for performance. If you see a URL like
>cdn.somesite.wank/img/DE/AD/BE/DEADBEEF12345678.pngthen this is what it's doing: each directory will now have a sensible number of file in it, and the server won't shit itself every time it tries to get a file in there and first needs to read a kajilion file names.
You can also assign files a Globally-Unique IDentifier. GUIDs are long strings of numbers that are so long that they're as likely to come up twice as it is you'll win the lottery every week this year.
>{7AFBD938-D57B-4D08-A31A-959159871F7F}is an example of a GUID. Software uses them everywhere it needs a filename or other reference that's guaranteed to be unique not only on that computer, but also any computer it gets sent to.