Please find flaws with my flow. I believe it is secure.
In terms of scaling with the number of files, I am suggesting the following structure:
{mycompany}/