file-handling

Validate, stream, and store file uploads in ASP.NET Core applications.

71|10|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/wshaddix/dotnet-skills --skill file-handling-wshaddix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-handling
Source: https://github.com/wshaddix/dotnet-skills/tree/main/skills/file-handling
Command: npx skills add https://github.com/wshaddix/dotnet-skills --skill file-handling-wshaddix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexities and security risks associated with handling file uploads and downloads in web applications, ensuring data integrity and preventing vulnerabilities.

Core Features & Use Cases

  • Secure File Uploads: Validates file types, sizes, and content signatures to prevent malicious uploads.
  • Efficient Streaming: Handles large files without consuming excessive memory.
  • Storage Abstraction: Supports various storage backends like local file systems and cloud services (Azure Blob).
  • Secure Downloads: Implements authorization checks and proper content disposition for safe file retrieval.
  • Image Optimization: Resizes and optimizes images during upload.
  • Use Case: Securely upload user profile pictures, process large document submissions, or stream video files to users.

Quick Start

Use the file-handling skill to upload a file named 'report.pdf' to the application's storage.

Frequently Asked Questions about file-handling

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

FAQPage Schema
How do I securely handle file uploads in ASP.NET Core without risking path traversal?

Secure file uploads in ASP.NET Core require validating file types, sizes, and content signatures to prevent malicious files. This Skill provides patterns that mitigate path traversal risks by abstracting storage and sanitizing inputs before saving files to local or Azure Blob storage.

What is the best way to stream large files during upload and download in an ASP.NET Core application?

Streaming large files in ASP.NET Core prevents excessive memory consumption by processing data in chunks. This Skill implements efficient streaming patterns for both uploads and downloads, allowing your application to handle large document submissions or video files without memory bottlenecks.

Can I use Azure Blob storage for saving and retrieving files with this ASP.NET Core file handling approach?

Yes, you can use Azure Blob storage for saving and retrieving files. This Skill includes a storage abstraction layer that supports both local file systems and cloud services like Azure Blob, enabling seamless backend transitions without rewriting core file handling logic.

How do I implement secure file downloads with proper authorization checks in ASP.NET Core?

Secure file downloads in ASP.NET Core require implementing authorization checks and proper content disposition headers. This Skill provides mechanisms to verify user permissions before serving files, ensuring safe retrieval and preventing unauthorized access to stored data.

Does this ASP.NET Core file handling approach support image processing and resizing during upload?

Yes, this file handling approach supports image processing and resizing during upload. It allows you to automatically resize and optimize images as they are uploaded, which is useful for securely managing user profile pictures and reducing storage overhead.