mardi 10 novembre 2020

How to manage media files in your cms

I'm building a media files storage function. In the frontend, it is just a directory tree like interface where user can traverse between different level of folders and see files inside it. This is what most of media files management look like.

I notice some of them use a database to keep trace of directory relationship and a specific path location of a certain file. Using a database in such a way has a major advance to me is that I don't need to look inside the real system directory to find out what files saved inside it. To display files, I just need to get those records from a database. Additionally, meta data can be also saved along with that file into the database.

But using a database increase the complexity because every time saving or delete a file, one needs to manipulate both file system and database both.

Which solution is the better - with or without a database, and why? What is the mainstream out there? Thanks.

Aucun commentaire:

Enregistrer un commentaire