Back to articles
Debugging a Silent Failure: Presigned R2 Uploads and the Inngest Job That Never Ran
How-ToTools

Debugging a Silent Failure: Presigned R2 Uploads and the Inngest Job That Never Ran

via Dev.tonareshipme

We shipped a file upload feature for ClipCrafter — paste a video URL or upload a file — and it looked like everything was working. The S3-compatible PUT request to Cloudflare R2 returned a 200 . No errors in the console. No red Vercel logs. Yet every uploaded video sat in limbo, never processed. Here's the bug, the fix, and what we learned. The Architecture in 30 Seconds ClipCrafter processes videos using Inngest background functions. The flow looks like this: User uploads a file → we generate a presigned R2 URL via a /api/upload route Client does a direct PUT to that presigned URL (R2 / Cloudflare) Client calls /api/projects/[id] to update the project with metadata A separate action triggers inngest.send({ name: "video/process", data: { projectId } }) Inngest picks up the event and runs the process-video function Simple enough. So what broke? The Bug: A Missing PATCH After a successful PUT to R2, our frontend was calling the project PATCH route — but only to save the video title . We

Continue reading on Dev.to

Opens in a new tab

Read Full Article
1 views

Related Articles