Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
命名动态/用户上传的图像时的一般经验法则是什么。例如,个人资料图片。
文件名是人类可读的(joshmason_profile.jpg)而不是随机的(sjdir2311.jpg)是否有好处?
你如何组织它们?全部在一个文件夹中,文件名在数据库中?或动态生成的文件夹(比如每个用户一个)?
在我们的应用程序中,我们使用从数据库生成的唯一 ID 命名文件,并将这些文件保存在单个文件夹中。
为每个用户生成一个文件夹将是一项乏味的任务。