Storage: Video upload in folders: year / month / day

Hello, how is it possible to make the video materials that are uploaded to the server be structured in folders, for example - year / month / day. With time I could move the old maps (videos) to a slightly slower storage with the help of the symlink. In the same way, I would like it to go to the same folder and the file from previews and torrents. Here is an example of how I would like it to be structured:

At the moment, the video materials after conversion all go to the map:
/var/www/peertube/storage/streaming-playlists/hls/ and when there are 10 thousand + folders it will be difficult to work and modify.

And if it is possible to make a directory for the live stream, so that it can be moved to tmpfs, at the moment the live stream goes to the directory: streaming-playlists/hls/

1 Like

Hi Sergiu, it’s a very interesting files structure used in Ghost blog platform for example.
I’m just wondering : if you want to move some videos on a slower storage, the right criteria is maybe the low view count instead of the age of the files, no ?

But of course, being able to sort files on storage through their view count and then move them would need a more complex developpement, where your solution is (I think) simplier to implement.

So, it was just some ideas… Best regards.