fix(blob): use private access by default with delivery routes#1443
Open
fix(blob): use private access by default with delivery routes#1443
Conversation
Private blob URLs are not directly accessible in the browser, so switching from public to private requires a server-side delivery route that streams the content using get() from @vercel/blob. Changes: - blob-starter: access: 'private', new /api/blob delivery route, toast links through delivery route instead of direct blob URL - blob-sveltekit: access: 'private', new /api/blob delivery route, form action returns delivery URL instead of direct blob URL - Both: bump @vercel/blob from ^1.0.0 to ^2.3.0 (required for private) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
access: 'public'toaccess: 'private'@vercel/blobfrom^1.0.0to^2.3.0(required for private storage support)blob-starter (Next.js)
components/uploader.tsx: Changed toaccess: 'private', toast now links through/api/blob?pathname=...app/api/blob/route.ts: Delivery route usingget()to stream private blob contentpackage.json:@vercel/blob^1.0.0 → ^2.3.0blob-sveltekit (SvelteKit)
src/routes/+page.server.ts: Changed toaccess: 'private', returns delivery URL instead of direct blob URLsrc/routes/api/blob/+server.ts: Delivery route usingget()to stream private blob contentpackage.json:@vercel/blob^1.0.0 → ^2.3.0Context
We're moving Vercel Blob toward private-by-default. These examples are what developers copy-paste from and are referenced from the Vercel dashboard.
Related:
Test plan
🤖 Generated with Claude Code