Integrating Payload CMS Media Library with BunnyCDN #10966
Unanswered
RajeshKumarpiacademyweb10
asked this question in
Q&A
Replies: 1 comment
-
I read that BunnyCDN s3 compatible is, so you can use the @payloadcms/plugin-cloud-storage plugin. You want images/media that are fully public to load from the CDN. (file) => {
if (!file.filename) {
return
}
return `${process.env.S3_ENDPOINT_PUBLIC}/${process.env.S3_BUCKET}/${file.prefix}/${file.filename}`
}; Media that has access control should go through payload. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone, I'm working on integrating Payload CMS Media Library with BunnyCDN for media storage and delivery. I have a few questions regarding the best approach:
Storage Configuration: What's the best way to configure Payload CMS to store media files directly on BunnyCDN Storage? Should I use a custom upload adapter or handle this via Bunny’s API?
Direct Uploads: Can I set up direct uploads from the CMS to BunnyCDN without routing files through the server? If so, any recommended way to do this efficiently?
Permissions & Security: Any best practices for securing media files when using BunnyCDN with Payload CMS?
Would love to hear from anyone who's done something similar or has insights! Thanks in advance. 🙌
Beta Was this translation helpful? Give feedback.
All reactions