Agent skill · Backend & API

minimal-api-file-upload

File upload endpoints in ASP.NET minimal APIs (.NET 8+)

dotnetgithub.com/dotnetGitHub ↗
claude-codeMIT
Install
npx skills add dotnet/skills --skill minimal-api-file-upload --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 10 KB
Bundled scripts: none
Path: plugins/dotnet-aspnetcore/skills/minimal-api-file-upload/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,927
Language: C#
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Implementing File Uploads in ASP.NET Core Minimal APIs ## When to Use - File upload endpoints in ASP.NET Core minimal APIs (.NET 8+) - Handling IFormFile or IFormFileCollection parameters - When you need size limits, content type validation, or streaming large files ## When Not to Use - MVC controllers → `[FromForm] IFormFile` works directly with attributes - Simple JSON body → no file upload needed - Very large files (> 1GB) → use streaming with `MultipartReader` instead ## Inputs | Input | Required | Description | |-------|----------|-------------| | File parameter(s) | Yes | IFormFile or IFormFileCollection | | Size limits | Yes | Max file/request size | | Allowed types | No | Content type or extension restrictions | ## Workflow ### Step 1: CRITICAL — Understand IFormFile Binding in Minimal APIs ```csharp // In .NET 8+ minimal APIs, IFormFile binds automatically from multipart/form-data // when it is the only complex parameter. app.MapPost("/upload", (IFormFile file) => ...); // CRITICAL: When you mix files with other form fields, use [FromForm] on all // form-bound parameters (or group them into a single [FromForm] DTO). app.MapPost("/upload-with-metadata", ([FromForm] IFormF

What's inside
Steps it walks through
  1. When to Use
  2. When Not to Use
  3. Inputs
  4. Workflow
  5. Step 1: CRITICAL — Understand IFormFile Binding in Minimal APIs
  6. Step 2: CRITICAL — File Size Limits Are Separate from Request Size Limits
  7. Step 3: CRITICAL — Anti-Forgery Auto-Validates Form Uploads in .NET 8+
  8. Step 4: CRITICAL — Validate File Content, Not Just Extension
  9. Step 5: CRITICAL — Streaming Large Files Without Buffering
  10. Common Mistakes
More from skills
All skills →
About this skill
What does the minimal-api-file-upload skill do?

File upload endpoints in ASP.NET minimal APIs (.NET 8+)

How do I install it?

Run `npx skills add dotnet/skills --skill minimal-api-file-upload --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going