Resourcefull 3.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Resourcefull --version 3.0.0
                    
NuGet\Install-Package Resourcefull -Version 3.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Resourcefull" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Resourcefull" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Resourcefull" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Resourcefull --version 3.0.0
                    
#r "nuget: Resourcefull, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Resourcefull@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Resourcefull&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Resourcefull&version=3.0.0
                    
Install as a Cake Tool

Resourcefull

Resourcefull stores and serves files of any type and size from infrastructure you run yourself. Upload, download, list and version resources in named containers through one client API, and keep the bytes in SQL Server, in memory for tests, or in a storage provider of your own.

Package What it's for
Resourcefull The clients and the provider interface.
Resourcefull.SqlServer Stores resources in SQL Server.
Resourcefull.InMemory Keeps resources in process memory, for tests and local development.

Features

  • Any size: uploads and downloads stream, so memory use stays flat whatever the file size.
  • Versioning: keep up to N versions of each resource, list them, download any of them, and restore an older one.
  • Integrity: every version records its length and SHA-256 hash, measured as it's written. An upload whose declared length doesn't match its content is rejected, and nothing is stored.
  • Safe under concurrency: each name always has exactly one current version, and create-only uploads can't overwrite each other.
  • Your own storage: implement IResourceRepository and register it with UseProvider.

Quick start

dotnet add package Resourcefull
dotnet add package Resourcefull.SqlServer   # or Resourcefull.InMemory

Register Resourcefull with a provider, and provision the database:

builder.Services.AddResourcefull(options => options
    .UseSqlServer(builder.Configuration.GetConnectionString("Resources")!)
    .UseVersioning(maxVersions: 10));

var app = builder.Build();
await app.Services.MigrateResourcefullDatabaseAsync();

Then use IResourceServiceClient for containers, and a container client for the resources in one:

public class Reports(IResourceServiceClient resources)
{
    public async Task<ResourceInfo> SaveAsync(string name, Stream content)
    {
        IResourceContainerClient reports = await resources.CreateResourceContainerIfNotExistsAsync("reports");
        return await reports.UploadAsync(name, content, new ResourceUploadOptions
        {
            Overwrite = true,
            Headers = new ResourceHeaders("application/pdf", null)
        });
    }

    public async Task<ResourceDownloadResult?> OpenAsync(string name)
        => await resources.GetResourceContainerClient("reports").DownloadStreamingAsync(name);
}

Documentation

The documentation site has everything below, plus the API reference.

Contributing

See CONTRIBUTING.md.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Resourcefull:

Package Downloads
Resourcefull.InMemory

In-memory storage for Resourcefull, for tests and local development. Not for production: everything is held in process memory and lost when the process ends.

Resourcefull.SqlServer

SQL Server storage for Resourcefull: streams content in chunks with bounded memory, keeps versions and content hashes, and ships idempotent provisioning and upgrade scripts.

Resourcefull.AspNetCore

ASP.NET Core support for Resourcefull: serve downloads with their headers and conditional responses, accept uploads with the request's preconditions, and turn Resourcefull's exceptions into status codes.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.1.0 819 10/29/2026
3.0.0 117 10/29/2026