SideSoftware.Storage 1.0.1

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

SideSoftware.Storage

Azure Blob Storage abstractions and implementation for .NET 10, with configurable file size limits, content type validation, SAS URL generation, and async streaming.

Installation

dotnet add package SideSoftware.Storage

Configuration

Add blob storage settings to your appsettings.json:

{
  "BlobStorage": {
    "ConnectionString": "UseDevelopmentStorage=true",
    "DefaultContainer": "documents",
    "DefaultSasExpirationMinutes": 60,
    "MaxFileSizeBytes": 10485760,
    "AllowedContentTypes": [
      "image/jpeg",
      "image/png"
    ]
  }
}

Register services in your DI container:

builder.Services.Configure<BlobStorageSettings>(
    builder.Configuration.GetSection(BlobStorageSettings.SectionName));

builder.Services.AddSingleton<IBlobStorageService, AzureBlobStorageService>();

Usage

Upload a file

var result = await blobStorage.UploadAsync("reports/monthly.pdf", fileStream);
// result.FullPath => "documents/reports/monthly.pdf"

Upload with options

var result = await blobStorage.UploadAsync("photo.jpg", imageBytes, new UploadBlobOptions
{
    ContainerName = "images",
    ContentType = "image/jpeg",
    Overwrite = false,
    Metadata = new Dictionary<string, string> { ["Author"] = "Jane" }
});

Download a file

// Streaming download
var result = await blobStorage.DownloadAsync("reports/monthly.pdf");
await result.Content.CopyToAsync(outputStream);

// Byte array download
byte[] bytes = await blobStorage.DownloadBytesAsync("reports/monthly.pdf");

Generate a SAS URL

var sas = await blobStorage.GetSasUrlAsync("reports/monthly.pdf", new BlobSasOptions
{
    ExpirationMinutes = 30,
    AllowRead = true,
    ContentDisposition = "attachment; filename=\"report.pdf\""
});
// sas.Url => time-limited URL for direct access

List blobs

await foreach (var blob in blobStorage.ListAsync(prefix: "reports/"))
{
    Console.WriteLine($"{blob.BlobName} ({blob.SizeBytes} bytes)");
}

Other operations

bool exists = await blobStorage.ExistsAsync("photo.jpg");
StoredBlobInfo? info = await blobStorage.GetInfoAsync("photo.jpg");
bool deleted = await blobStorage.DeleteAsync("photo.jpg");
await blobStorage.CopyAsync("photo.jpg", "photo-backup.jpg");
await blobStorage.EnsureContainerExistsAsync("my-container");

Credential Document Storage

A higher-level ICredentialDocumentStorage interface is included for managing credential documents (e.g., pilot licenses, medical certificates) with structured blob paths and metadata:

builder.Services.AddSingleton<ICredentialDocumentStorage, CredentialDocumentStorage>();
// Upload
var doc = await credentialStorage.UploadAsync(
    personId, "pilot-license", fileStream, "license.pdf");

// Get a time-limited view URL
string viewUrl = await credentialStorage.GetViewUrlAsync(doc.BlobPath);

// Get a download URL (prompts browser to save)
string downloadUrl = await credentialStorage.GetDownloadUrlAsync(
    doc.BlobPath, "pilot-license.pdf");

// List all documents for a person
await foreach (var item in credentialStorage.ListForPersonAsync(personId))
{
    Console.WriteLine($"{item.OriginalFileName} - {item.ContentType}");
}

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

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
1.0.1 103 2/16/2026
1.0.0 93 2/16/2026