Skip to content

Support 100 MB notebook source uploads#24

Merged
suguanYang merged 2 commits into
stagingfrom
fix/source-upload-100mb
May 10, 2026
Merged

Support 100 MB notebook source uploads#24
suguanYang merged 2 commits into
stagingfrom
fix/source-upload-100mb

Conversation

@suguanYang
Copy link
Copy Markdown
Contributor

Summary

  • Route large source uploads through private Vercel Blob client uploads so the browser no longer posts >4.5 MB files directly to /api/sources.
  • Add /api/source-uploads/blob to issue authenticated Blob client-upload tokens capped at the existing 100 MB document limit.
  • Let /api/sources accept Blob metadata, stream the private staged Blob into a temp file for Knowhere upload, and delete the staging Blob afterward.
  • Keep the existing small-file multipart path unchanged.

Verification

  • Red/green pnpm test src/lib/source-upload-request.test.ts -- --runInBand
  • Red/green pnpm test src/app/api/sources/route.test.ts -- --runInBand
  • Red/green pnpm test src/app/api/source-uploads/blob/route.test.ts -- --runInBand
  • Red/green pnpm test src/lib/source-upload.test.ts -- --runInBand
  • pnpm test
  • pnpm exec tsc --noEmit
  • pnpm lint
  • pnpm build
  • git diff --check

Notes

The staging failure was FUNCTION_PAYLOAD_TOO_LARGE, which happens before our route code can handle a large multipart body. This PR avoids that platform limit by sending large files from the browser to Vercel Blob first, then sending only a small metadata payload to the app route.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
knowhere-notebook-staging Ready Ready Preview, Comment May 10, 2026 8:59am

Request Review

@suguanYang suguanYang merged commit 5e55b83 into staging May 10, 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.

1 participant