feat: add Bunny Storage course cover uploads
This commit is contained in:
14
PORTAINER.md
14
PORTAINER.md
@@ -28,6 +28,20 @@ After deploying the new images:
|
||||
|
||||
The API key and embed-token key never reach the browser. The instructor browser uploads to the authenticated Academy API, which sends the file to Bunny; learners receive only a signed iframe URL.
|
||||
|
||||
## Bunny Storage course banners
|
||||
|
||||
Course banners use Bunny Storage, not the Stream library. Create one Standard Storage Zone in São Paulo and link one Standard Pull Zone to it. The Pull Zone hostname is the public CDN host for uploaded banners. Add these server-only variables to Portainer:
|
||||
|
||||
```env
|
||||
BUNNY_STORAGE_ZONE=compor-academy-storage
|
||||
BUNNY_STORAGE_PASSWORD=the-storage-zone-password
|
||||
BUNNY_STORAGE_ENDPOINT=https://the-storage-endpoint-shown-in-bunny
|
||||
BUNNY_STORAGE_CDN_HOST=https://your-pull-zone.b-cdn.net
|
||||
BUNNY_COVER_MAX_UPLOAD_MB=10
|
||||
```
|
||||
|
||||
The Storage Password is available in Bunny's **Storage Zone → FTP & API Access** section. Never expose it as a `VITE_` variable. In Academy, instructors can upload only JPG, PNG, or WebP cover images; the API verifies the image bytes and uploads them under a generated `covers/` filename. The CDN URL is then saved on the course.
|
||||
|
||||
### Bunny processing webhooks
|
||||
|
||||
The editor can poll Bunny while a video encodes, but production should also configure Bunny's webhook so the Academy records the result even when no instructor page is open. In the library webhook settings, use:
|
||||
|
||||
Reference in New Issue
Block a user