* chore: bump payload * test: add jest * chore: update eslint rules * feat: add email transport to plugin * ci: actions build and test * chore: bump typescript * chore: adjust top-level plugin options * test: clean up * feat: better env var handling, assertions * chore: update README * 1.1.0-beta.0 * chore: update package.json files * 1.1.0-beta.1 * chore: fix webpack recursion * 1.1.0-beta.2 * chore: bump payload * chore: email logging on success on error * 1.1.0-beta.3 * chore: use proper env var for default domain * 1.1.0-beta.4 * chore: log sendEmail error with better message * 1.1.0-beta.5 * chore: add comments to plugin options properties * 1.1.0-beta.6 * chore: bump payload peer dep * 1.1.0-beta.7 * chore: update README * chore: bump payload in dev dir * chore: package.json license * test: move test
1.5 KiB
Payload Cloud Plugin
This is the official Payload Cloud plugin that connects your Payload instance to the resources that Payload Cloud provides.
File storage
Payload Cloud gives you S3 file storage backed by Cloudflare as a CDN, and this plugin extends Payload so that all of your media will be stored in S3 rather than locally.
Email delivery
Payload Cloud provides an email delivery service out-of-the-box for all Payload Cloud customers. Powered by Resend.
How to use
Add the plugin to your Payload config
yarn add @payloadcms/plugin-cloud
import { payloadCloud } from '@payloadcms/plugin-cloud'
import { buildConfig } from 'payload/config'
export default buildConfig({
plugins: [payloadCloud()]
// rest of config
})
NOTE: If your Payload config already has an email with transport, this will take precedence over Payload Cloud's email service.
Optional configuration
If you wish to opt-out of any Payload cloud features, the plugin also accepts options to do so.
payloadCloud({
storage: false, // Disable file storage
email: false, // Disable email delivery
})
Future enhancements
API CDN
In the future, this plugin will also ship with a way to dynamically cache API requests as well as purge them whenever a resource is updated.
When it executes
This plugin will only execute if the required environment variables set by Payload Cloud are in place. If they are not, the plugin will not execute and your Payload instance will behave as normal.