Payload plugins can be insanely powerful, and they're trivial to write thanks to Payload's code-first, config-based nature. We've already seen an impressive array of community plugins, including a few great cloud storage solutions from Richard VanBergen and Alex Bechmann. We're extremely thankful for our community, especially Richard and Alex in regards to their help with cloud storage.
Over the past few months, enterprise clients of ours have asked quite a few times for us to build an officially supported cloud storage plugin, so that all files uploaded to Payload can be stored in the cloud storage provider of their choice. Of course, by default, Payload allows you to store uploads on your own server, but at scale, you might want to offload them to a CDN-backed service for performance and scalability reasons.
So we built a robust, officially supported cloud storage plugin. It's extremely powerful and comes out-of-the-box with Amazon S3 and Azure Blob Storage support. The plugin is built with an adapter-based approach, so you can use it with any cloud storage provider that you wish.
Installing and using the plugin is easy. Here's what it looks like to use the S3 adapter:
With this plugin, instead of saving files locally to your server, Payload will ship off all uploads, including all automatically resized images, straight to your cloud storage provider.
The plugin is built on a simple, yet powerful adapter-based implementation. This means it can be used for any type of cloud storage you need. Out of the box, it comes with Azure Blob Storage and AWS S3 support, but you can easily write your own adapter(s) to host your uploads wherever you need.
Payload comes with built-in access control for all uploads. It works seamlessly by re-using your upload-enabled collection's
read access control—meaning you can easily restrict who can access which uploads that are stored in your site. This is super powerful in lots of cases, and is a specific strength of Payload over other headless CMS.
Imagine if you had a public Customers collection, and your customers could upload sensitive documents to attach to their profile. You may only want certain users to be able to view these sensitive documents - i.e. admins or the customers themselves. But most people should be denied access.
With Payload, this is built-in. And this plugin fully supports this functionality, so you can build powerful and elegant access control patterns to protect your files—even when they're hosted on your cloud provider.
Get started by installing the plugin in your Payload app with the following command:
Need a plugin to be created? Join our Discord server and post in the
#plugins channel. The Payload team might create it for you, or maybe a community member can help!
If you haven't yet given the CMS a shot, you can get started free with one command: