What problem does it solve?
This Skill provides robust patterns for securely handling file uploads, streaming large files efficiently, abstracting storage solutions, and implementing secure downloads in ASP.NET Core Razor Pages applications.
Core Features & Use Cases
- Secure File Uploads: Validates file types, sizes, and content using magic numbers to prevent malicious uploads.
- Large File Streaming: Uploads large files directly to storage without consuming excessive memory.
- Storage Abstraction: Supports interchangeable storage backends like local file systems or Azure Blob Storage.
- Secure Downloads: Ensures files are downloaded with proper authorization and content disposition.
- Image Processing: Includes capabilities for resizing and optimizing image uploads.
- Use Case: Securely upload user-submitted documents, stream large video files to cloud storage, and provide authenticated download links for generated reports.
Quick Start
Implement a secure file upload endpoint in your Razor Pages application by integrating the provided FileUploadValidator and IFileStorageService.