Documentation

My Uploaded Assets Are Disappearing

All projects running on Servd have a local filesystem that they can interact with, but this filesystem is not guaranteed to persist over a long period of time.

To a lot of developers this sounds a little weird - isn't the filesystem where we put things if we want them to persist?

Normally, yes, but Servd is a high availability system, and those have slightly different rules...

Imagine if we want to scale up your application from one instance to two, or maybe we want to move it away from a misbehaving server. In both of these situations your project will need to interact with multiple filesystems.

Rather than introduce downtime as your project's filesystem is copied from one location to another, Servd simply assumes that everything on the filesystem is able to be recreated as required.

To facilitate this Servd will automatically move other state (like cache, PHP sessions, logs etc) off of the filesystem on your behalf, but the one thing we can't control is the assets that you upload.

So, if you can't upload assets to the local volumes, where should they go?

You should make use of an external object storage solution, specifically you should install the Servd Assets and Helpers plugin which will give you access to the Servd assets platform. This provides object storage for any type of uploaded file as well as distribution via a global CDN and intelligent backup and restore functionality.

All you need to do to get started is to install the plugin, create a new asset volume within the Craft Control Panel, then keep living your best life.

If for some reason you don't want to make use of Servd's Asset Platform, you can also use any other remote object storage solution such as AWS S3 or GCS. Be aware that if you do use an alternative ,you will not be able to make use of Servd's asset rollback functionality.