Skip to content

Repository files navigation

Shuttle.ContentStore

Simple content store abstraction.

Installation

dotnet add package Shuttle.ContentStore

Configuration

Register a content store implementation using the AddContentStore() builder:

services.AddContentStore()
    .UseAzure(options =>
    {
        options.ConnectionString = "UseDevelopmentStorage=true";
        options.ContainerName = "content-store";
    });

The Azure implementation requires the Shuttle.ContentStore.Azure package, and can be tested locally against the Azurite emulator.

Once registered, resolve IContentStore (or a specific keyed store, e.g. [FromKeyedServices("azure")]) to read and write content:

await contentStore.PutAsync("path/to/file.txt", stream);
await using var content = await contentStore.OpenReadAsync("path/to/file.txt");

About

Simple content store.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages