cad-blob-uploader

Adds Azure Blob Storage attachment uploads and SAS downloads to a JWT-secured ASP.NET Core TODO API.

2|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/jay-steenbergen/MSSAMentorAgent --skill cad-blob-uploader-jay-steenbergen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cad-blob-uploader
Source: https://github.com/jay-steenbergen/MSSAMentorAgent/tree/main/.github/skills/tracks/cloud-app-dev/cad-blob-uploader
Command: npx skills add https://github.com/jay-steenbergen/MSSAMentorAgent --skill cad-blob-uploader-jay-steenbergen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Learners building cloud APIs often never touch real object storage, leaving them unsure how to handle file uploads, where files should live, and how to serve downloads without overloading the API. This Skill provides a phased build recipe that extends an existing JWT-secured TODO API with Azure Blob Storage attachments, teaching SDK usage, streaming uploads, and SAS URLs hands-on. ## Core Features & Use Cases - Phased build recipe: Five phases covering SDK setup with DI, an EF Core migration for blob references, a multipart upload endpoint, a SAS URL download endpoint, and an end-to-end smoke test. - Concept coaching cues: Each phase names the concepts to explain out loud (singleton vs scoped lifetimes, streaming vs buffering, SAS vs proxying files) plus common gotchas and after-action review prompts. - Use Case: A mentor guiding an MSSA learner through project #6 of the Cloud Application Development track uses this recipe so the learner uploads a real photo to Azurite or Azure Storage, retrieves it via a 15-minute SAS URL, and verifies owner-scoped authorization against a second user. ## Quick Start Use the cad-blob-uploader skill to guide me through adding Azure Blob Storage file attachments to my secured TODO API, starting with verifying Azurite is running locally.

Frequently Asked Questions about cad-blob-uploader

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

FAQPage Schema
How do I upload files to Azure Blob Storage from ASP.NET Core?

Register BlobServiceClient as a singleton in DI, then in the controller accept an IFormFile, call file.OpenReadStream(), and pass the stream to blob.UploadAsync with BlobHttpHeaders for the content type. Streaming avoids loading the whole file into memory.

What is a SAS URL in Azure Blob Storage?

A SAS (Shared Access Signature) URL is a blob URL with cryptographically signed query parameters granting one permission, such as read, for a limited time. The client downloads directly from Azure, so the API never streams the file bytes itself.

Should BlobServiceClient be singleton or scoped in dependency injection?

BlobServiceClient should be registered as a singleton because it is thread-safe and expensive to create, holding HTTP connection pools. This contrasts with EF Core DbContext, which is scoped because it is not thread-safe.

Can I test Azure Blob Storage locally without an Azure account?

Yes, Azurite is a free local emulator that runs in Docker or as a VS Code extension and exposes the same API surface as real Blob Storage. The connection string UseDevelopmentStorage=true points the SDK at it on port 10000.

Why store files in blob storage instead of the database?

Storing files in the database inflates row sizes, balloons backups, and slows queries on the most expensive storage you own. The database should hold only the blob name and content type as a reference, while the bytes live in object storage.

Why does my multipart upload return 415 Unsupported Media Type?

The endpoint is likely missing the [Consumes("multipart/form-data")] attribute, so ASP.NET Core rejects form-data requests. Adding it also enables Swagger UI to render a file upload widget for testing.