migrate(chat): repoint /api/upload to recoup-api#1718
migrate(chat): repoint /api/upload to recoup-api#1718arpitgupta1214 wants to merge 3 commits intotestfrom
Conversation
Cuts over `usePureFileAttachments` and `lib/arweave/uploadFile.tsx` to the new dedicated `POST /api/upload` on api (Arweave bytes proxy parity), and removes the local route. The API response shape is 1:1, so this is a base-URL swap. `lib/arweave/uploadToArweave.ts` is kept since it's still imported by `lib/txtGeneration.ts` and `lib/ai/generateImage.ts`.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
No issues found across 3 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: This PR migrates core file upload functionality to an external API and removes a local route, which involves high-impact infrastructure changes and external dependencies.
Phase-1 of the api-side Arweave→Supabase upload migration (recoupable/api#492) returns Supabase public bucket URLs from POST /api/upload. Add the hostname to next.config.mjs remotePatterns so Next/Image can render them.
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Requires human review: This is a non-trivial refactor of the upload flow that changes the API endpoint from a local route to an external service, with a dependency on another PR. API changes, even if response shapes match,
Cuts over
usePureFileAttachmentsandlib/arweave/uploadFile.tsxto the new dedicatedPOST /api/uploadon api (group 2 of the chat→api migration), and removes the local route. Response shape is 1:1, so this is a base-URL swap.Depends on api PR landing on test first (Arweave parity endpoint).
Test plan
lib/arweave/uploadFile.tsx) succeedsSummary by cubic
Repoints file uploads to the centralized recoup API and allows Supabase public URLs to render in
next/image. Response shape is unchanged; returned URLs may be Supabase.Refactors
hooks/usePureFileAttachmentsandlib/arweave/uploadFile.tsxto callPOST /api/uploadviagetClientApiBaseUrl().app/api/upload/route.ts.*.supabase.co/storage/v1/object/public/**toimages.remotePatternsinnext.config.mjsfornext/image.Migration
next/imagewhen the URL is on*.supabase.co.Written for commit 889363c. Summary will update on new commits.