Local uploader: Make upload directory contain less direct children
Currently the uploader uses a flat directory structure. This means, as more and more files are uploaded, the directory can have up to (number of all uploads) children.
This is not good for some filesystems, like glusterfs, which performs pretty slow when I am trying to ls
under the upload directory.
It turns out other software like mastodon and synapse uses a nested structure, where the files are stored like a/ab/abc/(full file name)
. This largely reduces possible entries under the first level of the upload directory.