Though, I checked now.
I can create 1 million files in a directory on my Ubuntu box with the ext4 file system.
So, it should work with the current configuration.
Though, I checked now.
I can create 1 million files in a directory on my Ubuntu box with the ext4 file system.
So, it should work with the current configuration.
When an image is uploaded by a user, it is placed in one folder /public/uploads/files.
However, a folder can often contain a limited number of files and directories, say 64,000. And searching for a file is slower when there are many files in a directory.
Usually, uploaded files are placed into subdirectories:
/a/a1111
/a/a1112
...
/b/b1111
...
/c/c6565
...