nextjs-api-file-upload

Installation
SKILL.md

Next.js API File Upload (App Router)

This project uses Next.js App Router. File upload in API routes must use Next.js built-in handling, not Express middleware.

Do Not Use

  • Express middleware (e.g. multer) in API routes. It can block the request pipeline and cause long hangs (e.g. login or upload appearing stuck).

Do Use

  • request.formData() in the route handler.
  • Stream or parse the file (e.g. CSV) inside the handler after calling formData().

Example Pattern

Installs
8
GitHub Stars
2
First Seen
Mar 18, 2026
nextjs-api-file-upload — pmarashian/cursor-agent-skills