Why randomize your file names for cloud storage/CDN?

后端 未结 3 2054
無奈伤痛
無奈伤痛 2021-02-09 21:33

When you look at a profile picture on a social networking site like Twitter, they store image files like:

http://a1.twimg.com/profile_images/1082228637/a-smile_t         


        
3条回答
  •  庸人自扰
    2021-02-09 22:10

    Changing URLs is a safe way to invalidate outdated assets.

    It is also a necessity if you want to allow users storing private images. Using a path deductible from the users account name/id/path would render privacy settings useless as soon as you store assets on a CDN.

提交回复
热议问题