add cloudflare env process
This commit is contained in:
9297
cloudflare-env.d.ts
vendored
Normal file
9297
cloudflare-env.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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'
|
||||
@@ -66,8 +66,10 @@ export default buildConfig({
|
||||
cors: [getServerSideURL()].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