Rystem.Content.Infrastructure.Storage.Blob 10.0.7

dotnet add package Rystem.Content.Infrastructure.Storage.Blob --version 10.0.7
                    
NuGet\Install-Package Rystem.Content.Infrastructure.Storage.Blob -Version 10.0.7
                    
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="Rystem.Content.Infrastructure.Storage.Blob" Version="10.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rystem.Content.Infrastructure.Storage.Blob" Version="10.0.7" />
                    
Directory.Packages.props
<PackageReference Include="Rystem.Content.Infrastructure.Storage.Blob" />
                    
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 Rystem.Content.Infrastructure.Storage.Blob --version 10.0.7
                    
#r "nuget: Rystem.Content.Infrastructure.Storage.Blob, 10.0.7"
                    
#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 Rystem.Content.Infrastructure.Storage.Blob@10.0.7
                    
#: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=Rystem.Content.Infrastructure.Storage.Blob&version=10.0.7
                    
Install as a Cake Addin
#tool nuget:?package=Rystem.Content.Infrastructure.Storage.Blob&version=10.0.7
                    
Install as a Cake Tool

Rystem.Content.Infrastructure.Storage.Blob

This provider adds Azure Blob Storage support to the Content framework.

Repo note: the folder name is Rystem.Content.Infrastructure.Azure.Storage.Blob, but the current NuGet package id is Rystem.Content.Infrastructure.Storage.Blob.

Installation

dotnet add package Rystem.Content.Infrastructure.Storage.Blob

Architecture

The provider is a thin wrapper over BlobContainerClient.

  • registration builds a single container client
  • async registration creates the container immediately
  • Prefix is prepended to every blob name
  • SetPropertiesAsync maps to blob headers, metadata, and tags

The registration shape is defined in src/Content/Rystem.Content.Infrastructures/Rystem.Content.Infrastructure.Azure.Storage.Blob/BuilderExtensions/ContentRepositoryBuilderExtensions.cs and the runtime behavior lives in BlobStorage/BlobStorageRepository.cs.

Registration API

Method Default lifetime Notes
WithBlobStorageIntegrationAsync(options, name, serviceLifetime) Transient preferred path because setup is async
WithBlobStorageIntegration(options, name, serviceLifetime) Transient sync wrapper over the async implementation

Example

This matches the unit-test startup in src/Content/Rystem.Content.Tests/Rystem.Content.UnitTest/Startup.cs.

var repositories = builder.Services.AddContentRepository();

await repositories.WithBlobStorageIntegrationAsync(options =>
{
    options.ContainerName = "supertest";
    options.Prefix = "site/";
    options.ConnectionString = builder.Configuration["ConnectionString:Storage"];
    options.UploadOptions = new BlobUploadOptions
    {
        AccessTier = AccessTier.Cool
    };
}, "blobstorage");

Resolve and use it:

public sealed class BlobAssetService
{
    private readonly IContentRepository _repository;

    public BlobAssetService(IFactory<IContentRepository> factory)
        => _repository = factory.Create("blobstorage");

    public ValueTask<bool> UploadAsync(string path, byte[] data)
        => _repository.UploadAsync(path, data, new ContentRepositoryOptions
        {
            HttpHeaders = new ContentRepositoryHttpHeaders
            {
                ContentType = "image/png"
            },
            Metadata = new Dictionary<string, string>
            {
                ["source"] = "upload"
            },
            Tags = new Dictionary<string, string>
            {
                ["version"] = "1"
            }
        });
}

Settings

BlobStorageConnectionSettings exposes:

Property Notes
ConnectionString used when present
EndpointUri used for managed identity mode
ManagedIdentityClientId null means DefaultAzureCredential; otherwise ManagedIdentityCredential
ContainerName used in connection-string mode
Prefix prepended to every blob path
IsPublic when true, registration sets public blob access on the container
ClientOptions passed to BlobContainerClient
UploadOptions reused by UploadAsync(...)

Managed identity note

In managed identity mode, the provider constructs the client as:

new BlobContainerClient(settings.EndpointUri, credential, settings.ClientOptions)

So EndpointUri needs to point to the container itself, not just the storage account. In that path, ContainerName is ignored.

Provider behavior

  • UploadAsync writes the blob and then calls SetPropertiesAsync(...)
  • GetPropertiesAsync reads blob properties and optionally tags
  • DownloadAsync downloads content and can also include headers, metadata, and tags
  • ListAsync can optionally download content for each blob

Native Blob features supported by this provider:

  • HTTP headers
  • metadata
  • blob tags

Important caveats

Prefix handling is not fully uniform

  • ListAsync strips the configured prefix from the returned Path
  • DownloadAsync returns Path = blobClient.Name, which still includes the prefix
  • GetPropertiesAsync does the same

So if you rely on Path, be aware that list results and direct point-lookups are not fully normalized.

overwrite is weaker than it looks

UploadAsync(path, data, options, overwrite) accepts an overwrite flag, but the current implementation always calls blobClient.UploadAsync(...) with the configured upload options.

If you need strict create-only semantics when overwrite == false, enforce that in your application with ExistAsync(...) before uploading.

ContentInformationType.None still returns an options object

For Blob and File providers, informationRetrieve == None returns an empty ContentRepositoryOptions instance rather than null.

When to use this provider

Use it when you want:

  • Azure Blob Storage as the backing store
  • native blob metadata and tag support
  • optional public container access
  • simple path-prefix partitioning inside one container

Avoid assuming that all providers behave exactly like Blob Storage. The Content abstraction keeps the method names aligned, not every detail of path, URI, and overwrite semantics.

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.7 85 3/26/2026
10.0.6 191,604 3/3/2026
10.0.5 104 2/22/2026
10.0.4 101 2/9/2026
10.0.3 147,865 1/28/2026
10.0.1 209,089 11/12/2025
9.1.3 323 9/2/2025
9.1.2 764,464 5/29/2025
9.1.1 97,815 5/2/2025
9.0.32 186,699 4/15/2025
9.0.31 5,801 4/2/2025
9.0.30 88,873 3/26/2025
9.0.29 9,028 3/18/2025
9.0.28 276 3/17/2025
9.0.27 247 3/16/2025
9.0.26 255 3/13/2025
9.0.25 52,120 3/9/2025
9.0.21 319 3/6/2025
9.0.20 19,573 3/6/2025
9.0.19 304 3/6/2025
Loading failed