docs: add registerStorageProvider steps to storage-setup guide#611
Merged
Conversation
Following the guide verbatim previously threw "Unknown storage provider type: s3" on first upload because the registration step was undocumented. - Add a "Provider Registration" section near the top explaining the registry model, noting that 'local' is built in and needs no setup - Add step 6 (register S3 provider via instrumentation.ts) to the AWS S3 setup flow; renumber subsequent steps accordingly - Add step 5 (register Vercel Blob provider) to the Vercel Blob setup flow; renumber subsequent steps accordingly - Add a registration-required callout to the S3-Compatible Services section (Backblaze B2, MinIO, DigitalOcean Spaces all use type 's3') - Update the Multiple Storage Providers advanced pattern to show registering both S3 and Vercel Blob providers in instrumentation.ts - Update the Environment-Specific Storage pattern to show conditional dynamic import + registration per NODE_ENV - Add "Unknown storage provider type" troubleshooting entry explaining that reads are unaffected and pointing to the new section Closes #562 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzbiVtVTFXT4Y7LPgLuAwP
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…Next.js 13 caveat - Add missing `type S3StorageConfig` import and `<S3StorageConfig>` type parameter to the Environment-Specific Storage dynamic-import snippet so it type-checks correctly (without it, TypeScript infers BaseStorageConfig and new S3StorageProvider(config) fails to compile) - Add Next.js 13/14 caveat about experimental.instrumentationHook to the top-level Provider Registration section, not just the S3 step note Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzbiVtVTFXT4Y7LPgLuAwP
Contributor
Coverage Report for Core Package Coverage (./packages/core)
File CoverageNo changed files found. |
Contributor
Coverage Report for UI Package Coverage (./packages/ui)
File CoverageNo changed files found. |
Contributor
Coverage Report for CLI Package Coverage (./packages/cli)
File CoverageNo changed files found. |
Contributor
Coverage Report for Auth Package Coverage (./packages/auth)
File CoverageNo changed files found. |
Contributor
Coverage Report for Storage Package Coverage (./packages/storage)
File CoverageNo changed files found. |
Contributor
Coverage Report for RAG Package Coverage (./packages/rag)
File CoverageNo changed files found. |
Contributor
Coverage Report for Storage S3 Package Coverage (./packages/storage-s3)
File CoverageNo changed files found. |
Contributor
Coverage Report for Storage Vercel Package Coverage (./packages/storage-vercel)
File CoverageNo changed files found. |
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
Following the storage-setup guide verbatim previously caused a runtime error on the first upload:
This happened because
registerStorageProviderwas only documented in the packageCLAUDE.mdandCHANGELOG, not in the end-user guide. The read path worked fine (metadata only stamps the provider name), so the problem wasn't visible until the first upload.Changes made to
docs/content/guides/storage-setup.md:'local'is built in (no setup needed) and all other providers must be explicitly registeredinstrumentation.tsrecommendation as the correct Next.js location to callregisterStorageProvider, with a note about Next.js 13/14 vs 15+ supportS3StorageProviderininstrumentation.ts; CloudFront step renumbered to 8VercelBlobStorageProviderininstrumentation.ts; subsequent steps renumbered's3'type and need the same registration stepinstrumentation.tsNODE_ENVUnknown storage provider typeexplaining why reads work but writes fail, and pointing to the fixTest plan
instrumentation.tsis clearly recommended as the registration location for Next.js hosts'local'is noted as built-in (no registration needed) in the new section and troubleshooting entryCloses #562
Generated by Claude Code