Soenneker.Blob.Upload 4.0.3260

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

Uploads files, streams, bytes, and text to Azure block blobs.

Installation

dotnet add package Soenneker.Blob.Upload

Configuration

{
  "Environment": "Production",
  "Azure": {
    "Storage": {
      "Blob": {
        "ConnectionString": "<connection string>",
        "AccountName": "<storage account name>",
        "AccountKey": "<storage account key>"
      }
    }
  }
}

The connection string is used for uploads. The account name, account key, and environment are required by the registered SAS utility and by UploadAndGetSasUri.

Registration

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

services.AddBlobUploadUtilAsSingleton();

AddBlobUploadUtilAsScoped() is also available.

Upload text or bytes

using Soenneker.Blob.Upload.Abstract;

public sealed class ManifestStore
{
    private readonly IBlobUploadUtil _uploads;

    public ManifestStore(IBlobUploadUtil uploads)
    {
        _uploads = uploads;
    }

    public async ValueTask Save(
        string json,
        CancellationToken cancellationToken)
    {
        _ = await _uploads.Upload(
            "assets",
            "manifests/latest.json",
            json,
            contentType: "application/json",
            cancellationToken: cancellationToken);
    }
}

Upload a file or stream

Use the file and stream overloads to avoid first copying large content into a byte array:

_ = await uploads.UploadFromFile(
    "exports",
    "daily/archive.zip",
    absolutePath,
    contentType: "application/zip",
    cancellationToken: cancellationToken);

await using FileStream input = File.OpenRead(absolutePath);

_ = await uploads.Upload(
    "exports",
    "daily/archive.zip",
    input,
    contentType: "application/zip",
    cancellationToken: cancellationToken);

The stream overload begins at the stream's current position and does not dispose or rewind it.

Upload and create a read URL

string sasUri = await uploads.UploadAndGetSasUri(
    "private-assets",
    "previews/report.pdf",
    pdfBytes,
    contentType: "application/pdf",
    cancellationToken: cancellationToken);

The returned URL is read-only and expires after one month. Treat it as a credential: do not log it or expose it to callers that should not read the blob.

Behavior

  • Every upload overwrites an existing block blob at the same container and path. This API does not expose conditional create or ETag protection.
  • Supplying contentType stores it in the blob's HTTP headers. The library does not infer a MIME type from a filename.
  • Byte-array and string overloads buffer content in a temporary memory stream. Prefer file or stream uploads for large or untrusted payloads.
  • The caller owns streams passed to Upload; the library-owned streams used by byte and string overloads are disposed automatically.
  • The underlying client utility creates a missing container. publicAccessType applies only during that creation and does not change an existing container's access level.
  • Azure service failures are thrown as RequestFailedException; cancellation is passed through to client creation and upload.
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 (1)

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

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
4.0.3260 52 9/13/2026
4.0.3259 51 9/13/2026
4.0.3258 38 9/13/2026
4.0.3257 49 9/13/2026
4.0.3256 49 9/13/2026
4.0.3255 48 9/13/2026
4.0.3254 42 9/13/2026
4.0.3253 70 9/13/2026
4.0.3252 60 9/12/2026
4.0.3250 76 9/12/2026
4.0.3249 51 9/12/2026
4.0.3248 46 9/12/2026
4.0.3247 82 9/10/2026
4.0.3246 64 9/9/2026
4.0.3245 62 9/9/2026
4.0.3244 61 9/9/2026
4.0.3243 69 9/9/2026
4.0.3242 62 9/9/2026
4.0.3241 69 9/8/2026
4.0.3240 113 9/8/2026
Loading failed

Updated NuGet packages

NuGet-Builder-Operation: 5cfef90e71fe4cc8846bcf6967bea7c8