minimal-api-file-upload

Implement secure file upload endpoints in ASP.NET minimal APIs.

Updated May 28, 2026
One-click install
npx skills add https://github.com/ojrojas/AgentsInstructions --skill minimal-api-file-upload-ojrojas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: minimal-api-file-upload
Source: https://github.com/ojrojas/AgentsInstructions/tree/main/.claude/skills/dotnet-aspnet/skills/minimal-api-file-upload
Command: npx skills add https://github.com/ojrojas/AgentsInstructions --skill minimal-api-file-upload-ojrojas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the challenge of implementing secure and efficient file upload functionality in ASP.NET minimal APIs, simplifying the process for .NET developers.

Core Features & Use Cases

  • File Upload Endpoints: Facilitates the creation of endpoints that handle file uploads.
  • Size Limits & Validation: Offers guidance on configuring size limits and content type validation.
  • Content Handling: Explains how to handle file content, including streaming large files.
  • Use Case: Ideal for developing modern web applications where users need to upload files, such as images, documents, or other binary content.

Quick Start

Use the minimal-api-file-upload skill to create a file upload endpoint in your ASP.NET minimal API project.

Frequently Asked Questions about minimal-api-file-upload

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a secure file upload endpoint in an ASP.NET minimal API?

To implement a secure file upload endpoint in an ASP.NET minimal API, you need to configure file size limits, validate content types, and apply anti-forgery token validation. This ensures your endpoint safely processes uploaded files.

What is the best way to handle large file uploads in ASP.NET minimal APIs?

The best way to handle large file uploads in ASP.NET minimal APIs is by streaming the file content directly. Streaming large files prevents memory exhaustion by avoiding buffering the entire payload in server memory.

Does the ASP.NET minimal API file upload approach require .NET 8?

Yes, implementing file upload endpoints using this approach requires knowledge of .NET 8+ and minimal API patterns. You need a compatible .NET environment to apply these specific file handling guidelines.

How do I validate content types and set size limits for file uploads in minimal APIs?

To validate content types and set size limits for file uploads in minimal APIs, configure your endpoint to check the incoming file headers and enforce maximum payload sizes. This blocks invalid or oversized submissions.

When should I use anti-forgery token validation for file uploads in ASP.NET?

You should use anti-forgery token validation for file uploads in ASP.NET to prevent cross-site request forgery attacks. It ensures that file submission requests originate from trusted, authenticated users.