I am beginning to refactor a large, very old, messy project. One of the biggest issues is the lack of a central location on the filesystem for simple things like images, icons, documents, csv, etc.
The number of assets is on the scale of thousands, so I am looking for ways streamline management. Should I be looking into finding a CDN or some other kind of external storage and load/store the files that way?
Or should I continue to store files in the local file hierarchy? I would like to use a process that is easy to manage and common, so that there is little friction as the development team grows.
1
There are a couple of ways to approach this, depending on your requirements and scale.
First of all though, I don’t believe a CDN is appropriate in this case. A CDN is used for caching of static documents to provide faster delivery of those assets to end users. It’s not relevant for centralised storage or management of files.
At the larger end of solutions are Digital Asset Management (DAM) systems, such as Adobe Bridge. These are specialised applications that allow management of assets for digital channels, and can be easily integrated to server your web app(s).
An easier solution is to roll your own, using blob storage within your database (or some other blob storage mechanism like Microsoft Azure Storage). This will allow you to work with a database and use ORM’s in your code for managing the assets. It’s also far more performant (and ACID safe) than reading from a file system.