So I have looked at this in greater detail and here are the problems 1 I see.
The sortedset really only records two bits of information: the UID and the filename. If anything more is needed the filesystem will have to be queried and logic added to evaluate the file. My view is I'd rather store this in the DB and pick it up in a single query than collect the data from the filesystem on the pageload. This process lacks the post validation check for uploads. This leaves debris in both the database and on the file system. I didn't spot a cleanup system that might take care of this.1 These are from the perspective of the problem I think I am trying to solve, aside from the couple I saw that are duplicates of issues I created in my own efforts.