Soenneker.Blob.Download 11.0.3738

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Blob.Download

Downloads Azure blobs to temporary files, memory streams, or strings.

Installation

dotnet add package Soenneker.Blob.Download

Configuration

Provide the Azure Storage connection string through configuration:

{
  "Azure": {
    "Storage": {
      "Blob": {
        "ConnectionString": "<connection string>"
      }
    }
  }
}

Registration

using Microsoft.Extensions.DependencyInjection;
using Soenneker.Blob.Download.Registrars;

services.AddBlobDownloadUtilAsScoped();

AddBlobDownloadUtilAsSingleton() is also available when a singleton lifetime fits the application.

Usage

using Soenneker.Blob.Download.Abstract;

public sealed class DocumentStore
{
    private readonly IBlobDownloadUtil _downloads;

    public DocumentStore(IBlobDownloadUtil downloads)
    {
        _downloads = downloads;
    }

    public async ValueTask<string> ReadManifest(CancellationToken cancellationToken)
    {
        return await _downloads.DownloadToString(
            "documents",
            "manifests/latest.json",
            cancellationToken: cancellationToken);
    }
}

Download to a temporary file when the content should not be buffered in memory:

FileInfo file = await downloads.Download(
    "documents",
    "exports/archive.zip",
    cancellationToken: cancellationToken);

try
{
    // Consume file here.
}
finally
{
    file.Delete();
}

For in-memory processing, dispose the returned stream:

await using MemoryStream stream = await downloads.DownloadToMemory(
    "documents",
    "images/logo.png",
    cancellationToken: cancellationToken);

Choosing a download method

Method Use it when Ownership
Download The blob may be large or a file-based API needs the result Delete the returned temporary file
DownloadToMemory A stream-based API needs reasonably sized content Dispose the returned stream
DownloadToString The blob is reasonably sized text Returns an owned string

Behavior

  • DownloadToMemory and DownloadToString buffer the entire blob. Prefer Download for large or untrusted content.
  • The stream returned by DownloadToMemory is positioned at 0.
  • Failed file downloads remove the incomplete temporary file when possible. Failed memory downloads dispose their stream.
  • A missing blob is reported through Azure's RequestFailedException, including a 404 status when returned by the service.
  • publicAccessType is used only if the underlying client utility creates a missing container; it does not update an existing container's access level.
  • Cancellation is passed to Azure Storage and temporary resource creation.
Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.Blob.Download:

Package Downloads
Soenneker.Blob.Suite

A concoction of Azure Blob Storage utilities and libraries

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.3738 0 11/21/2026
11.0.3737 116 11/19/2026
11.0.3736 89 11/19/2026
11.0.3735 82 11/18/2026
11.0.3734 87 11/18/2026
11.0.3733 78 11/18/2026
11.0.3732 85 11/18/2026
11.0.3729 85 11/18/2026
11.0.3728 84 11/18/2026
11.0.3727 91 11/18/2026
11.0.3726 117 11/16/2026
11.0.3725 114 11/15/2026
11.0.3724 143 11/11/2026
11.0.3722 129 11/11/2026
11.0.3721 97 11/11/2026
11.0.3719 122 11/11/2026
11.0.3718 96 11/11/2026
11.0.3717 89 11/11/2026
11.0.3715 94 11/11/2026
11.0.3714 120 11/11/2026
Loading failed

Update dependency Soenneker.Blob.Client to 11.0.2283 (#4598)