Skip to content

fix(create-app): use MEDIA_BUCKET binding in starter wrangler.toml#827

Merged
lane711 merged 2 commits into
mainfrom
lane711/top-3-issues
May 8, 2026
Merged

fix(create-app): use MEDIA_BUCKET binding in starter wrangler.toml#827
lane711 merged 2 commits into
mainfrom
lane711/top-3-issues

Conversation

@lane711
Copy link
Copy Markdown
Collaborator

@lane711 lane711 commented May 8, 2026

Summary

  • Fresh installs generated binding = "BUCKET" in the starter wrangler.toml, but the admin media upload code (api-media.ts, admin-media.ts, api-system.ts) expects the R2 binding to be named MEDIA_BUCKET.
  • This caused every fresh install to fail media uploads with "Media Storage (R2) is not configured" — even though an R2 bucket was bound.
  • One-line fix to align the template binding name with what the runtime code expects.

Changes

  • packages/create-app/templates/starter/wrangler.toml: rename R2 binding BUCKETMEDIA_BUCKET

Testing

  • Fresh create-sonicjs install + media upload works without manual wrangler.toml edits

Fixes #815

🤖 Generated with Claude Code

Fresh installs generated `binding = "BUCKET"` in wrangler.toml, but the
admin media upload code (api-media.ts, admin-media.ts, api-system.ts)
expects the R2 binding to be named `MEDIA_BUCKET`. This caused media
uploads to fail on every fresh install with "Media Storage (R2) is not
configured" even though an R2 bucket was bound.

Fixes #815

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@lane711 lane711 merged commit 6ed55dc into main May 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fresh install R2 binding mismatch breaks media uploads

1 participant