How is the best way to store files linked with a database where not too many files are stored in the same directory (slowing down FTP browsing etc)
My own proposal:
3000000/0/70000/9000/100/30/3079138.full.pdf
3000000/0/70000/9000/100/30/3079138.thumb.png
3000000/0/70000/8000/900/20/3078928.full.png
3000000/0/70000/8000/900/20/3078928.thumb.pdf
3000000/0/70000/8000/900/20/3078929.full.pdf
3000000/0/70000/8000/900/20/3078929.thumb.png
With this solution there will always be a maximum of 10 files (id’s) in each directory
With files (id’s) ranging from 1 to 1999 the directories in the root will look like this:

create path for an ID
get path for an ID
class