dotnet-scaffold-file-handler

Generate file handler interface, implementation, DirectoryNames constant, and DI registration.

8|1|Updated Feb 5, 2018
One-click install
npx skills add https://github.com/umbrella-libraries/Umbrella --skill dotnet-scaffold-file-handler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-scaffold-file-handler
Source: https://github.com/umbrella-libraries/Umbrella/tree/main/.ai-shared/skills/dotnet-scaffold-file-handler
Command: npx skills add https://github.com/umbrella-libraries/Umbrella --skill dotnet-scaffold-file-handler

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scaffold a new Umbrella-compatible file handler to manage storage operations (save, retrieve, delete, and URL generation) in the Core.Logic project, with a consistent DirectoryNames constant and DI registration.

Core Features & Use Cases

  • Generate the interface, implementation, DirectoryNames constant, and DI registration for a new file handler.
  • Support for optional post-save processing (e.g., image resizing) and the separation of authorization into a dedicated UmbrellaFileAuthorizationHandler when needed.
  • Keeps storage concerns isolated to a single handler, enabling grouping of files such as attachments, reports, or user uploads.

Quick Start

Scaffold a new <Name>FileHandler in the Core.<AppName>.Core.Logic.FileSystem and wire it up in DI.

Frequently Asked Questions about dotnet-scaffold-file-handler

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

FAQPage Schema
How do I scaffold a .NET file handler for managing storage operations like save and retrieve?

To scaffold a .NET file handler, generate a new interface, implementation, DirectoryNames constant, and DI registration. This ensures consistent file-management across modules for groupings like attachments or user uploads in the Core.Logic project.

What do I need to set up before scaffolding a file handler for dependency injection?

Before scaffolding a file handler, ensure the DirectoryName mapping matches existing DirectoryNames constants. You also need to prepare a separate UmbrellaFileAuthorizationHandler if authorization is required for the specific file operations.

Can I add post-save processing when implementing a .NET file handler?

Yes, you can add optional post-save processing when implementing a .NET file handler. This allows you to perform additional actions such as image resizing immediately after the initial file storage operation completes successfully.

What is the best way to organize file uploads and attachments in a .NET storage layer?

The best way to organize file uploads is to isolate storage concerns into a single scaffolded file handler. This approach generates a dedicated interface and implementation, keeping file-management consistent across different application modules.

Does the scaffolded .NET file handler include built-in authorization for file retrieval?

No, the scaffolded .NET file handler does not include built-in authorization. It requires a separate UmbrellaFileAuthorizationHandler to manage access control for file retrieval, deletion, and saving operations when needed.

Why does my scaffolded file handler need a specific constructor signature?

Your scaffolded file handler needs a specific constructor signature to ensure proper dependency injection and integration with Umbrella's storage layer. This enforces consistent initialization and enables the handler to correctly execute storage operations.