How does Instagram name files

2019-06-25 08:11发布

问题:

How does Instagram name files, are the file names random? based on some sort of hash? or is there some meaning to them? for example

http://distilleryimage2.instagram.com/21a9ca729bf511e2985c22000a1f9ad3_7.jpg

回答1:

Good answer - The blog post is out of date now as their naming has changed, but it's probably still based on MD5.



回答2:

After further inspection, I think it's just an MD5 hash or something followed by _# for the image size



回答3:

Instagram uses an MD5 hash as the base name, followed by an underscore and a number representing the image size. Note that they probably don't just use file contents in their hash, as uploading the same image would possibly generate a filename collision, so they probably add in some entropy into their calculation.