Update payload.config.ts to assert non-null environment variables
Use non-null assertion operator for R2 environment variables to ensure they are defined at runtime.
This commit is contained in:
@@ -72,12 +72,12 @@ export default buildConfig({
|
||||
collections: {
|
||||
media: true,
|
||||
},
|
||||
bucket: process.env.R2_BUCKET,
|
||||
bucket: process.env.R2_BUCKET!,
|
||||
config: {
|
||||
endpoint: `https://${process.env.R2_ACCOUNT_ID}.r2.cloudflarestorage.com`,
|
||||
endpoint: `https://${process.env.R2_ACCOUNT_ID!}.r2.cloudflarestorage.com`,
|
||||
credentials: {
|
||||
accessKeyId: process.env.R2_ACCESS_KEY_ID,
|
||||
secretAccessKey: process.env.R2_SECRET_ACCESS_KEY,
|
||||
accessKeyId: process.env.R2_ACCESS_KEY_ID!,
|
||||
secretAccessKey: process.env.R2_SECRET_ACCESS_KEY!,
|
||||
},
|
||||
region: 'auto',
|
||||
// ... Other S3 configuration
|
||||
|
||||
Reference in New Issue
Block a user