Files for .NET apps, stored where you choose

Resourcefull stores and serves files of any type and size from infrastructure you run yourself: the SQL Server or PostgreSQL database you already have, or a directory on your own disks. Upload, download, list and version them through one client API. When you move to the cloud, change one line to keep the bytes in Amazon S3, another S3-compatible store or Azure Blob Storage instead.

$ dotnet add package Resourcefull.SqlServer
Program.cs
builder.Services.AddResourcefull(options => options
    .UseSqlServer(connectionString)
    .UseVersioning(maxVersions: 10));

// Streams the body into storage, at any size.
app.MapPut("/files/{container}/{**name}",
    (string container, string name,
     HttpRequest request, IResourceServiceClient files) =>
        files.GetContainerClient(container)
             .UploadFromRequestAsync(name, request));

// Sends the file with ETags and range requests (4.0).
app.MapGet("/files/{container}/{**name}",
    (string container, string name,
     IResourceServiceClient files) =>
        Results.Resource(
            files.GetContainerClient(container),
            name));

Everything files need, in one library

The parts every application ends up writing around file storage, built once, tested against every provider, and documented for people who aren't storage specialists.