开发者

1 folder per user or all users share the same?

开发者 https://www.devze.com 2023-01-15 19:07 出处:网络
Im having photo albums on my site which will be a vital part of the website and most users will upload images, lets say i get 10.000 visitors with an avarge uplo开发者_StackOverflowad of 10 images =10

Im having photo albums on my site which will be a vital part of the website and most users will upload images, lets say i get 10.000 visitors with an avarge uplo开发者_StackOverflowad of 10 images =100.000 images, should each visitor get his own folder MKDIR() or should i just store all the images in the same folder? there is no risk for images having the same name or anything

but i just wonder what is best practice


By putting too many files in one folder, you're risking hitting limits of the filesystem of use. You didn't mention what filesystem is going to store all those images, but indeed all of them have some sort of limits (or it may slow things down). You'd better put each users images in their own folders.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号