Skip to content

fix(upload): send resumable uploads to the configured Supabase URL - #358

Merged
riglar merged 1 commit into
devfrom
fix/tus-upload-custom-domain
Nov 24, 2026
Merged

riglar merged 1 commit into
devfrom
fix/tus-upload-custom-domain

Conversation

@riglar

@riglar riglar commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

What

  • The resumable (TUS) upload now uses ENVIRONMENTS[env].supabase.url as its storage host. Before, it built a <project>.storage.supabase.co hostname itself and ignored the configured URL.
  • For prod, the configured URL is a devicecloud.dev custom domain. So after this change, uploads from the CLI only need devicecloud.dev to be reachable, not supabase.co. Dev is unchanged in practice: its configured URL is the project's own Supabase URL.
  • Removes SupabaseGateway.uploadToSignedUrl, which nothing called, and its two debug helpers.
  • That method was the only user of @supabase/supabase-js, so the dependency is removed too.
  • Removes the now-unused projectRef field from ENVIRONMENTS.

Checked

  • pnpm lint, pnpm typecheck, pnpm test:unit (766 passing), pnpm build, pnpm audit all pass locally.
  • A TUS create request sent to the custom domain and to the old storage host gets the same answer from Storage.

Not yet checked

  • A full upload through the custom domain. TUS follows a Location header after the first request, and I haven't confirmed that it stays on the custom domain. Run dcd upload --debug (or dcd cloud --debug) against prod from a beta build before releasing.

🤖 Generated with Claude Code

The resumable upload built its own storage hostname instead of using the
Supabase URL in ENVIRONMENTS. For prod that URL is a devicecloud.dev custom
domain, so customer networks only need to reach devicecloud.dev.

Also removes the unused signed-URL upload path, which was the only user of
@supabase/supabase-js, and drops that dependency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@riglar
riglar merged commit edf10a7 into dev Nov 24, 2026
9 checks passed
@riglar
riglar deleted the fix/tus-upload-custom-domain branch November 24, 2026 16:35
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.

1 participant