astrolabe-file-storage-azure

Store files in Azure Blob Storage with metadata persisted via Entity Framework Core.

1|5|Updated Aug 6, 2023
One-click install
npx skills add https://github.com/astrolabe-apps/astrolabe-common --skill astrolabe-file-storage-azure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: astrolabe-file-storage-azure
Source: https://github.com/astrolabe-apps/astrolabe-common/tree/main/skills/astrolabe-file-storage-azure
Command: npx skills add https://github.com/astrolabe-apps/astrolabe-common --skill astrolabe-file-storage-azure

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides an Azure Blob Storage backed file storage solution that integrates seamlessly with Entity Framework, enabling applications to store files in the cloud while maintaining rich, queryable metadata.

Core Features & Use Cases

  • BlobContainerFileStorage wraps an Azure BlobContainerClient to expose a generic IFileStorage<T> interface for file operations.
  • Custom blob path generation lets you organize storage by date, user, or content type.
  • Metadata transformation persists file metadata (path, type, size, uploaded time) to your domain model via EF Core.
  • ASP.NET Core friendly: integrates with DI and EF Core to streamline upload/download workflows.

Quick Start

Configure a sample FileEntity and an Azure Blob-backed storage, define a path scheme such as uploads/{yyyy}/{MM}/{dd}/{Guid}/{filename}, upload a file and verify that the FileEntity stores BlobPath, ContentType, and Size.

Frequently Asked Questions about astrolabe-file-storage-azure

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

FAQPage Schema
How do I store files in Azure Blob Storage using Entity Framework Core?

You can store files in Azure Blob Storage with EF Core by using a storage wrapper that maps uploads to domain entities, persisting metadata like BlobPath, ContentType, and Size directly through your EF Core data context.

How do I organize Azure Blob Storage paths by date or user in an ASP.NET Core application?

You organize Azure Blob Storage paths by defining a custom path generation scheme, such as uploads/{yyyy}/{MM}/{dd}/{Guid}/{filename}, within your upload pipeline to systematically structure blobs by date, user, or content type.

Does Azure Blob Storage work with EF Core for persisting file metadata?

Yes, Azure Blob Storage works with EF Core by applying metadata transformation during the upload pipeline, allowing file attributes like path, type, size, and uploaded time to be saved and queried within your domain model.

What is the best way to map uploaded files to domain entities in ASP.NET Core?

The best way to map uploaded files to domain entities in ASP.NET Core is to use an integrated file storage interface that defines newUploadPath and newUpload operations, automatically linking the uploaded blob to a domain FileEntity.

Do I need a BlobContainerClient to manage file storage in ASP.NET Core?

Yes, you need a BlobContainerClient to manage file storage in ASP.NET Core, as it acts as the underlying Azure Storage wrapper required to expose the generic file storage interface for upload and download workflows.

Why does my EF Core file upload pipeline require custom path generation for Azure Blob Storage?

Your EF Core upload pipeline requires custom path generation to systematically organize Azure Blob Storage by date, user, or content type, ensuring that the BlobPath stored in your domain FileEntity follows a predictable structure.