add cloudflare R2 config
This commit is contained in:
@@ -5,7 +5,7 @@ import sharp from 'sharp' // sharp-import
|
||||
import path from 'path'
|
||||
import { buildConfig, PayloadRequest } from 'payload'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
import { r2Storage } from '@payloadcms/storage-r2'
|
||||
import { Categories } from './collections/Categories'
|
||||
import { Media } from './collections/Media'
|
||||
import { Pages } from './collections/Pages'
|
||||
@@ -70,8 +70,11 @@ export default buildConfig({
|
||||
].filter(Boolean),
|
||||
globals: [Header, Footer],
|
||||
plugins: [
|
||||
...plugins,
|
||||
// storage-adapter-placeholder
|
||||
r2Storage({
|
||||
bucket: cloudflare.env.R2,
|
||||
collections: { media: true },
|
||||
}),
|
||||
],
|
||||
secret: process.env.PAYLOAD_SECRET,
|
||||
sharp,
|
||||
|
||||
Reference in New Issue
Block a user