Jump to content

MindAttic.Storage: Difference between revisions

From MindAttic Docs
md2wiki: sync from MindAttic.Docs
 
md2wiki: sync from MindAttic.Docs
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
= MindAttic.Storage =
= MindAttic.Storage =


Drop-in media storage for ASP.NET Core apps: one upload API, a catalog row per file, and a media endpoint that serves from local disk or hands large files straight to Azure Blob Storage.
Drop-in media storage for ASP.NET Core apps: one upload API, a catalog row per file on your own database, the file itself on local disk, and a media endpoint that streams it back with Range, ETag and caching.


https://img.shields.io/badge/.NET-10-512BD4.svg https://img.shields.io/badge/ASP.NET%20Core-library-512BD4.svg https://img.shields.io/badge/EF%20Core-SQL%20Server-CC2927.svg https://img.shields.io/badge/Azure-Blob%20Storage-0078D4.svg https://img.shields.io/badge/version-1.0.0-2f7a4f.svg
https://img.shields.io/badge/.NET-10-512BD4.svg https://img.shields.io/badge/ASP.NET%20Core-library-512BD4.svg https://img.shields.io/badge/EF%20Core-SQL%20Server-CC2927.svg https://img.shields.io/badge/version-1.0.0-2f7a4f.svg


<pre class="md-code lang-text"> your app                      MindAttic.Storage                      storage
<pre class="md-code lang-text"> your app                      MindAttic.Storage                      storage
Line 11: Line 11:
                                   ├─ LocalDiskMediaStore  &lt;= 2 MB ──> inline bytes in the MediaItem row
                                   ├─ LocalDiskMediaStore  &lt;= 2 MB ──> inline bytes in the MediaItem row
                                   │                        >  2 MB ──> MediaRoot/{uid}/{file}
                                   │                        >  2 MB ──> MediaRoot/{uid}/{file}
                                  └─ AzureBlobMediaStore  any size ──> container/{uid}/{file}
                                   │
                                   │
                                   └─ MediaItem row (uid, tenant, folder, type, size, sha256, ...)
                                   └─ MediaItem row (uid, tenant, folder, type, size, sha256, ...)


  GET /_media/{uid} ──> signer present? ──> 302 to SAS, public or CDN URL  (Range and seeking by Azure)
  GET /_media/{uid} ──> stream through the app (ETag, Last-Modified, Range, Cache-Control)</pre>
                      otherwise      ──> stream through the app (ETag, Last-Modified, Range)</pre>


Two NuGet packages: <code>MindAttic.Storage</code> (the abstraction, the EF Core model, the local-disk store and the endpoint) and <code>MindAttic.Storage.Azure</code> (the Azure Blob backend and URL signer).
The supported package is <code>MindAttic.Storage</code>: the abstraction, the EF Core model, the local-disk store (<code>AddMedia</code>) and the endpoint.
 
<blockquote>
<strong>Azure is frozen.</strong> MindAttic's Azure resources were decommissioned on 2026-11-26. <code>MindAttic.Storage.Azure</code> 1.0.0 (<code>AddMediaAzure</code>, the Azure Blob store and its URL signer) stays on the feed only for the consumers that still reference it; it gets no new work and is removed in 2.0.0 (MS-154). New apps use <code>AddMedia</code>; Prose and IdeaCms, the two apps still on it, switch to <code>AddMedia&lt;TContext></code> with a local <code>MediaRoot</code> as described in [[MindAttic.Storage/MIGRATION#Switching off MindAttic.Storage.Azure|MIGRATION.md: Switching off MindAttic.Storage.Azure]].
</blockquote>
 
== Scope ==
 
The complete product, built and planned, is specified in [[MindAttic.Storage/SPEC|docs/SPEC.md]]; the current finish line is [[MindAttic.Storage/RELEASE|docs/RELEASE.md]]. MS-57 documents the local-disk path and freezes Azure; MS-154 then removes the Azure package once Prose and IdeaCms have switched, finishing the product as 2.0.0.


== Why ==
== Why ==


* Add uploads to an app with two registration lines and one endpoint mapping.
* Add uploads to an app with two registration lines and one endpoint mapping.
* Swap local disk for Azure Blob Storage without touching the code that uploads or links to media.
* Keep small files in the database row and large ones on local disk, decided while the upload streams.
* Serve video properly: with Azure, the browser gets a signed URL and the storage service handles Range requests, resuming and seeking, so the bytes never pass through your app.
* Serve video properly: the endpoint answers Range requests, so the browser can resume and seek.
* Stream gigabyte uploads without buffering them in memory; size and SHA-256 are computed in one pass.
* Stream gigabyte uploads without buffering them in memory; size and SHA-256 are computed in one pass.
* Recover from mistakes: deletes are soft, and the stored file stays where it is.
* Recover from mistakes: deletes are soft, and the stored file stays where it is.
Line 34: Line 40:
* <strong><code>MediaItem</code> catalog row</strong> with uid, optional tenant id, media type, folder, file name, content type, size, SHA-256, inline bytes or blob URI, width, height, notes, soft-delete flag, timestamps, an <code>Extra</code> field and a row version. <code>MediaItemTypeConfiguration</code> maps it with a unique index on uid and indexes on hash and on tenant, folder and file name.
* <strong><code>MediaItem</code> catalog row</strong> with uid, optional tenant id, media type, folder, file name, content type, size, SHA-256, inline bytes or blob URI, width, height, notes, soft-delete flag, timestamps, an <code>Extra</code> field and a row version. <code>MediaItemTypeConfiguration</code> maps it with a unique index on uid and indexes on hash and on tenant, folder and file name.
* <strong>Local disk store:</strong> payloads up to <code>InlineThresholdBytes</code> (2 MB by default) are kept inline in the database row; larger ones spill to <code>MediaRoot/{uid}/{file}</code>. <code>ThresholdSpillStream</code> makes that decision without knowing the length up front.
* <strong>Local disk store:</strong> payloads up to <code>InlineThresholdBytes</code> (2 MB by default) are kept inline in the database row; larger ones spill to <code>MediaRoot/{uid}/{file}</code>. <code>ThresholdSpillStream</code> makes that decision without knowing the length up front.
* <strong>Azure Blob store:</strong> streams every upload to <code>{uid:N}/{file}</code> in the container with configurable block size, creating the container if needed. Authenticates with a connection string or with <code>DefaultAzureCredential</code> against a blob service URI.
* <strong><code>/_media/{uid}</code> endpoint:</strong> streams the content with range processing, an ETag from the SHA-256, Last-Modified and a private <code>Cache-Control</code> max-age. Every response carries <code>X-Content-Type-Options: nosniff</code>. Images, text, video, audio and PDF are served inline; other types download with their file name. Active content that a browser could run script from (<code>text/html</code>, <code>image/svg+xml</code>, XML and <code>+xml</code> types, JavaScript, and any content type that does not parse) is never rendered inline: it downloads as an attachment with <code>Content-Security-Policy: sandbox</code>, so an uploaded page cannot run on your origin.
* <strong>URL signer</strong> (<code>IMediaUrlSigner</code>): a plain or CDN-fronted URL when the container allows public reads, a key-signed SAS with a connection string, or a user-delegation SAS with Entra credentials. Anything else falls back to streaming.
* <strong><code>/_media/{uid}</code> endpoint:</strong> redirects to a signed URL when a signer is registered, redirects to a stored absolute http or https URL, and otherwise streams the content with range processing, an ETag from the SHA-256, Last-Modified and a private <code>Cache-Control</code> max-age. Every response carries <code>X-Content-Type-Options: nosniff</code>. Images, text, video, audio and PDF are served inline; other types download with their file name. Active content that a browser could run script from (<code>text/html</code>, <code>image/svg+xml</code>, XML and <code>+xml</code> types, JavaScript, and any content type that does not parse) is never rendered inline: it downloads as an attachment with <code>Content-Security-Policy: sandbox</code>, so an uploaded page cannot run on your origin. The Azure store stamps <code>Content-Disposition: attachment</code> on such blobs and the signer adds it to their SAS URLs, so they download straight from storage too.
* <strong>File-name sanitizing</strong> that strips path segments (both <code>/</code> and <code>\</code>) and characters invalid on Windows, the same way on every OS. Blob paths of rows stored before this rule are still rebuilt with the earlier, OS-dependent rule (<code>MediaNaming.LegacySanitizeFileName</code>), so existing media keeps resolving.
* <strong>File-name sanitizing</strong> that strips path segments (both <code>/</code> and <code>\</code>) and characters invalid on Windows, the same way on every OS. Blob paths of rows stored before this rule are still rebuilt with the earlier, OS-dependent rule (<code>MediaNaming.LegacySanitizeFileName</code>), so existing media keeps resolving.
* <strong>No orphans on failure:</strong> if an upload is cancelled, the copy fails or the catalog save fails, the spill file or the partially written blob is removed.
* <strong>No orphans on failure:</strong> if an upload is cancelled, the copy fails or the catalog save fails, the spill file is removed.
* <strong>Frozen: Azure Blob backend</strong> (<code>MindAttic.Storage.Azure</code> 1.0.0, kept only for existing consumers). <code>AddMediaAzure</code> replaces the local store with <code>AzureBlobMediaStore</code> and registers <code>AzureBlobUrlSigner</code> as the <code>IMediaUrlSigner</code>; when a signer is registered, <code>/_media/{uid}</code> redirects to a signed or public blob URL instead of streaming, and a row whose stored location is an absolute http or https URL is redirected to it. No new work goes into this path; see [[MindAttic.Storage/MIGRATION#Switching off MindAttic.Storage.Azure|Switching off MindAttic.Storage.Azure]] to leave it.


== Quick start ==
== Quick start ==


The packages are published to a local feed (<code>C:\LocalNuGet</code>, see <code>nuget.config</code>). Reference them from your web project:
The package is published to a local feed (<code>C:\LocalNuGet</code>, see <code>nuget.config</code>). Reference it from your web project:


<pre class="md-code lang-xml">&lt;PackageReference Include="MindAttic.Storage" Version="1.0.0" />
<pre class="md-code lang-xml">&lt;PackageReference Include="MindAttic.Storage" Version="1.0.0" /></pre>
&lt;PackageReference Include="MindAttic.Storage.Azure" Version="1.0.0" /></pre>


MindAttic apps keep the package reference and, in Debug builds, add a project reference to a sibling checkout of this repo, so local changes are picked up without packing:
MindAttic apps keep the package reference and, in Debug builds, add a project reference to a sibling checkout of this repo, so local changes are picked up without packing:
Line 66: Line 70:
<pre class="md-code lang-csharp">// Local disk (default MediaRoot is ./media next to the app)
<pre class="md-code lang-csharp">// Local disk (default MediaRoot is ./media next to the app)
builder.Services.AddMedia&lt;AppDbContext>(o => o.MediaRoot = @"D:\Data\media");
builder.Services.AddMedia&lt;AppDbContext>(o => o.MediaRoot = @"D:\Data\media");
// or Azure Blob Storage, replacing the local store and adding the URL signer
builder.Services.AddMediaAzure&lt;AppDbContext>(o =>
{
    o.BlobServiceUri = new Uri("https&#58;//&lt;account>.blob.core.windows.net");
    o.ContainerName = "media";
});


app.MapMediaEndpoints();</pre>
app.MapMediaEndpoints();</pre>
Line 85: Line 82:
== Configuration ==
== Configuration ==


<code>MediaStoreOptions</code> (local disk, and the base of the Azure options):
<code>MediaStoreOptions</code>, set through <code>AddMedia</code>:


{| class="wikitable"
{| class="wikitable"
Line 99: Line 96:
| 2 MB
| 2 MB
| Payloads at or below this size stay inline in the row
| Payloads at or below this size stay inline in the row
|-
| <code>SignedUrlLifetime</code>
| 1 hour
| How long a signed URL stays valid
|-
|-
| <code>CacheMaxAgeSeconds</code>
| <code>CacheMaxAgeSeconds</code>
Line 111: Line 104:
| library default
| library default
| Buffer size for the copy-and-hash loop
| Buffer size for the copy-and-hash loop
|-
| <code>SignedUrlLifetime</code>
| 1 hour
| Frozen Azure path only: how long a signed URL stays valid; removed in 2.0.0
|}
|}


<code>AzureMediaOptions</code> adds:
Frozen: <code>AzureMediaOptions</code> (<code>MindAttic.Storage.Azure</code>, no new work) adds:


{| class="wikitable"
{| class="wikitable"
Line 149: Line 146:
<pre class="md-code lang-powershell">dotnet test MindAttic.Storage.slnx</pre>
<pre class="md-code lang-powershell">dotnet test MindAttic.Storage.slnx</pre>


The NUnit suite covers the local disk store, blob naming, the spill stream and the <code>/_media</code> endpoint, using the EF Core in-memory provider. The Azure integration tests run against the Azurite emulator and are skipped when it is not listening:
The NUnit suite covers the local disk store, <code>AddMedia</code> registration, the spill stream and the <code>/_media</code> endpoint, using the EF Core in-memory provider. The frozen Azure package keeps its naming and Azurite integration tests until 2.0.0 removes it; the integration tests are skipped when no Azurite emulator is listening.
 
<pre class="md-code lang-bash">npx azurite --silent --location ./azurite --blobHost 127.0.0.1 --blobPort 10000</pre>


== Project layout ==
== Project layout ==
Line 163: Line 158:
|-
|-
| <code>src/MindAttic.Storage.Azure</code>
| <code>src/MindAttic.Storage.Azure</code>
| <code>AzureBlobMediaStore</code>, <code>AzureBlobUrlSigner</code>, container factory, naming, options and DI extensions
| Frozen: <code>AzureBlobMediaStore</code>, <code>AzureBlobUrlSigner</code>, container factory, naming, options and DI extensions; removed in 2.0.0
|-
|-
| <code>src/MindAttic.Storage.Tests</code>
| <code>src/MindAttic.Storage.Tests</code>
| NUnit tests, including the Azurite integration tests
| NUnit tests, including the frozen package's Azurite integration tests
|}
|}


Line 174: Line 169:
* The column types in <code>MediaItemTypeConfiguration</code> are SQL Server specific.
* The column types in <code>MediaItemTypeConfiguration</code> are SQL Server specific.
* Deletes are soft only. Reclaiming storage from deleted items is a separate operation the library does not provide.
* Deletes are soft only. Reclaiming storage from deleted items is a separate operation the library does not provide.
* The Azure store always writes to blob storage; the inline threshold applies to the local disk store.
* Local disk only for new work: the frozen Azure store always writes to blob storage and ignores the inline threshold.


== Formerly MindAttic.Media ==
== Formerly MindAttic.Media ==
Line 195: Line 190:
== Documentation ==
== Documentation ==


* [https://github.com/mindattic/MindAttic.Storage/blob/main/AGENTS.md AGENTS.md]: entry point for AI agents working in this repo; it points at the shared MindAttic agent standard.
* AGENTS.md: entry point for AI agents working in this repo; it points at the shared MindAttic agent standard.


== License ==
== License ==
Line 205: Line 200:
== Pages in this repository ==
== Pages in this repository ==
* [[MindAttic.Storage/BIBLE|MindAttic.Storage — Project Bible]] — MindAttic.Storage is drop-in media storage for ASP.NET Core apps: one upload API, one catalog row per file, and a /_media/{uid} endpoint…
* [[MindAttic.Storage/BIBLE|MindAttic.Storage — Project Bible]] — MindAttic.Storage is drop-in media storage for ASP.NET Core apps: one upload API, one catalog row per file, and a /_media/{uid} endpoint…
* [[MindAttic.Storage/CODE_LEDGER|Code ledger: MindAttic.Storage]] — Every tracked source file and the ticket in this repo's tree that accounts for it (MAT-T484; method:…
* [[MindAttic.Storage/MIGRATION|Migrating from MindAttic.Media]] — MindAttic.Media was renamed to MindAttic.Storage on 2026-11-24 (feature M.MDIA-T23). The API is unchanged: the public type names…
* [[MindAttic.Storage/MIGRATION|Migrating from MindAttic.Media]] — MindAttic.Media was renamed to MindAttic.Storage on 2026-11-24 (feature M.MDIA-T23). The API is unchanged: the public type names…
* [[MindAttic.Storage/RELEASE|MindAttic.Storage — Release charter]] — Drop-in media storage for ASP.NET Core apps (formerly MindAttic.Media): one upload API, a catalog row per file, and the /_media/{uid}…
* [[MindAttic.Storage/RELEASE|MindAttic.Storage — Release charter]] — Drop-in media storage for ASP.NET Core apps (formerly MindAttic.Media): one upload API, a catalog row per file, and the /_media/{uid}…
* [[MindAttic.Storage/SPEC|MindAttic.Storage — Product specification]] — In docs/ECOSYSTEM.md MindAttic.Storage owns the files concern: apps store and serve uploaded files through it.


<div class="md2wiki-source">From [https://github.com/mindattic/MindAttic.Storage/blob/main/README.md MindAttic.Storage/README.md] via MindAttic.Docs; synced automatically, so edit the repo, not this page.</div>
<div class="md2wiki-source">From [https://github.com/mindattic/MindAttic.Storage/blob/main/docs/overview.md MindAttic.Storage/docs/overview.md] via MindAttic.Docs; synced automatically, so edit the repo, not this page.</div>


[[Category:MindAttic.Storage]]
[[Category:MindAttic.Storage]]

Latest revision as of 15:49, 1 December 2026

MindAttic.Storage

Drop-in media storage for ASP.NET Core apps: one upload API, a catalog row per file on your own database, the file itself on local disk, and a media endpoint that streams it back with Range, ETag and caching.

.NET-10-512BD4.svg ASP.NET%20Core-library-512BD4.svg EF%20Core-SQL%20Server-CC2927.svg version-1.0.0-2f7a4f.svg

 your app                      MindAttic.Storage                       storage
 ─────────                     ─────────────────                       ───────
 UploadAsync(stream, ...) ──>  IMediaStore ──> hash (SHA-256) in flight
                                  │
                                  ├─ LocalDiskMediaStore   <= 2 MB ──> inline bytes in the MediaItem row
                                  │                        >  2 MB ──> MediaRoot/{uid}/{file}
                                  │
                                  └─ MediaItem row (uid, tenant, folder, type, size, sha256, ...)

 GET /_media/{uid} ──> stream through the app (ETag, Last-Modified, Range, Cache-Control)

The supported package is MindAttic.Storage: the abstraction, the EF Core model, the local-disk store (AddMedia) and the endpoint.

Azure is frozen. MindAttic's Azure resources were decommissioned on 2026-11-26. MindAttic.Storage.Azure 1.0.0 (AddMediaAzure, the Azure Blob store and its URL signer) stays on the feed only for the consumers that still reference it; it gets no new work and is removed in 2.0.0 (MS-154). New apps use AddMedia; Prose and IdeaCms, the two apps still on it, switch to AddMedia<TContext> with a local MediaRoot as described in MIGRATION.md: Switching off MindAttic.Storage.Azure.

Scope

The complete product, built and planned, is specified in docs/SPEC.md; the current finish line is docs/RELEASE.md. MS-57 documents the local-disk path and freezes Azure; MS-154 then removes the Azure package once Prose and IdeaCms have switched, finishing the product as 2.0.0.

Why

  • Add uploads to an app with two registration lines and one endpoint mapping.
  • Keep small files in the database row and large ones on local disk, decided while the upload streams.
  • Serve video properly: the endpoint answers Range requests, so the browser can resume and seek.
  • Stream gigabyte uploads without buffering them in memory; size and SHA-256 are computed in one pass.
  • Recover from mistakes: deletes are soft, and the stored file stays where it is.
  • Refer to every file by one stable GUID, so storage layout can always be rebuilt from the catalog row.

Features

  • IMediaStore: UploadAsync, ListAsync (by tenant, folder and media type), GetMetaAsync (catalog row only, no payload), GetAsync (row plus content stream) and DeleteAsync.
  • MediaItem catalog row with uid, optional tenant id, media type, folder, file name, content type, size, SHA-256, inline bytes or blob URI, width, height, notes, soft-delete flag, timestamps, an Extra field and a row version. MediaItemTypeConfiguration maps it with a unique index on uid and indexes on hash and on tenant, folder and file name.
  • Local disk store: payloads up to InlineThresholdBytes (2 MB by default) are kept inline in the database row; larger ones spill to MediaRoot/{uid}/{file}. ThresholdSpillStream makes that decision without knowing the length up front.
  • /_media/{uid} endpoint: streams the content with range processing, an ETag from the SHA-256, Last-Modified and a private Cache-Control max-age. Every response carries X-Content-Type-Options: nosniff. Images, text, video, audio and PDF are served inline; other types download with their file name. Active content that a browser could run script from (text/html, image/svg+xml, XML and +xml types, JavaScript, and any content type that does not parse) is never rendered inline: it downloads as an attachment with Content-Security-Policy: sandbox, so an uploaded page cannot run on your origin.
  • File-name sanitizing that strips path segments (both / and \) and characters invalid on Windows, the same way on every OS. Blob paths of rows stored before this rule are still rebuilt with the earlier, OS-dependent rule (MediaNaming.LegacySanitizeFileName), so existing media keeps resolving.
  • No orphans on failure: if an upload is cancelled, the copy fails or the catalog save fails, the spill file is removed.
  • Frozen: Azure Blob backend (MindAttic.Storage.Azure 1.0.0, kept only for existing consumers). AddMediaAzure replaces the local store with AzureBlobMediaStore and registers AzureBlobUrlSigner as the IMediaUrlSigner; when a signer is registered, /_media/{uid} redirects to a signed or public blob URL instead of streaming, and a row whose stored location is an absolute http or https URL is redirected to it. No new work goes into this path; see Switching off MindAttic.Storage.Azure to leave it.

Quick start

The package is published to a local feed (C:\LocalNuGet, see nuget.config). Reference it from your web project:

<PackageReference Include="MindAttic.Storage" Version="1.0.0" />

MindAttic apps keep the package reference and, in Debug builds, add a project reference to a sibling checkout of this repo, so local changes are picked up without packing:

<PackageReference Include="MindAttic.Storage" Version="1.0.0" />
<ProjectReference Include="..\MindAttic.Storage\src\MindAttic.Storage\MindAttic.Storage.csproj"
                  Condition="'$(Configuration)' == 'Debug' AND Exists('..\MindAttic.Storage\src\MindAttic.Storage\MindAttic.Storage.csproj')" />

Adjust the ..\ depth to where your project sits relative to the MindAttic.Storage folder.

Add the catalog table to your DbContext:

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    modelBuilder.ApplyConfiguration(new MediaItemTypeConfiguration());
}

Register a store and map the endpoint:

// Local disk (default MediaRoot is ./media next to the app)
builder.Services.AddMedia<AppDbContext>(o => o.MediaRoot = @"D:\Data\media");

app.MapMediaEndpoints();

Upload and link:

var item = await store.UploadAsync(file.OpenReadStream(), file.FileName, file.ContentType, folder: "covers");
var url = $"/_media/{item.Uid}";

Add an EF Core migration in your app for the MediaItem table. The column mapping uses varbinary(max) and nvarchar(max), so it targets SQL Server.

Configuration

MediaStoreOptions, set through AddMedia:

Option Default Meaning
MediaRoot media next to the app Folder for spilled payloads
InlineThresholdBytes 2 MB Payloads at or below this size stay inline in the row
CacheMaxAgeSeconds 3600 max-age on streamed responses; 0 disables caching
CopyBufferSize library default Buffer size for the copy-and-hash loop
SignedUrlLifetime 1 hour Frozen Azure path only: how long a signed URL stays valid; removed in 2.0.0

Frozen: AzureMediaOptions (MindAttic.Storage.Azure, no new work) adds:

Option Default Meaning
BlobServiceUri none Account endpoint, authenticated with DefaultAzureCredential
ConnectionString none Takes precedence over the URI and enables key-signed SAS
ContainerName media Blob container
PublicRead false Container allows anonymous reads; the signer hands out plain URLs, which a CDN can cache
PublicBaseUri none CDN or custom-domain origin used in place of the blob endpoint
UploadBlockSizeBytes 8 MB Block size for streamed uploads

Testing

dotnet test MindAttic.Storage.slnx

The NUnit suite covers the local disk store, AddMedia registration, the spill stream and the /_media endpoint, using the EF Core in-memory provider. The frozen Azure package keeps its naming and Azurite integration tests until 2.0.0 removes it; the integration tests are skipped when no Azurite emulator is listening.

Project layout

Path What it is
src/MindAttic.Storage IMediaStore, IMediaUrlSigner, MediaItem and its EF configuration, LocalDiskMediaStore, ThresholdSpillStream, the endpoint and DI extensions
src/MindAttic.Storage.Azure Frozen: AzureBlobMediaStore, AzureBlobUrlSigner, container factory, naming, options and DI extensions; removed in 2.0.0
src/MindAttic.Storage.Tests NUnit tests, including the frozen package's Azurite integration tests

Limitations

  • No migrations ship with the library; the host app owns its schema.
  • The column types in MediaItemTypeConfiguration are SQL Server specific.
  • Deletes are soft only. Reclaiming storage from deleted items is a separate operation the library does not provide.
  • Local disk only for new work: the frozen Azure store always writes to blob storage and ignores the inline threshold.

Formerly MindAttic.Media

This repo was MindAttic.Media until it was renamed in 2026-11. The packages were renamed and their versions reset; the API is the same, including the public type names (IMediaStore, MediaItem, AddMedia, AddMediaAzure, MapMediaEndpoints) and the /_media endpoint. Only the namespaces change from MindAttic.Media to MindAttic.Storage.

Old package New package
MindAttic.Media 2.0.0 MindAttic.Storage 1.0.0
MindAttic.Media.Azure 2.0.0 MindAttic.Storage.Azure 1.0.0

Source: github.com/mindattic/MindAttic.Storage. docs/MIGRATION.md has the full mapping, the steps to move a consumer, and the consumers already moved.

Documentation

  • AGENTS.md: entry point for AI agents working in this repo; it points at the shared MindAttic agent standard.

License

This repository has no LICENSE file; all rights are reserved.

Part of MindAttic — see more projects at github.com/mindattic.

Pages in this repository

From MindAttic.Storage/docs/overview.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.