Let's take a look at the design for this feature.
In this case, as we are not storing our files in the database, we need to take a closer look at what actually needs to be managed in the database so as to keep track of what is going on in the file system. In addition to standard file metadata, we need to keep a close eye on where the file actually lives—specifically which file system folder the file will reside in. We also need to be able to maintain which accounts own which files, or in the case of system files, which files can be viewed by anyone.

You may be wondering why I have a separate section regarding folders when we just touched upon the fact that we will be managing which file system folder we will be storing files in. In this section we are going to discuss folder management from a site perspective rather than a file system perspective—user folders or virtual folders if you desire.
Very similar to file storage, we will be storing various metadata about each...