Cloud.Azure.Storage.Blobs.Manager 8.0.0

dotnet add package Cloud.Azure.Storage.Blobs.Manager --version 8.0.0
NuGet\Install-Package Cloud.Azure.Storage.Blobs.Manager -Version 8.0.0
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="Cloud.Azure.Storage.Blobs.Manager" Version="8.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cloud.Azure.Storage.Blobs.Manager --version 8.0.0
#r "nuget: Cloud.Azure.Storage.Blobs.Manager, 8.0.0"
#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.
// Install Cloud.Azure.Storage.Blobs.Manager as a Cake Addin
#addin nuget:?package=Cloud.Azure.Storage.Blobs.Manager&version=8.0.0

// Install Cloud.Azure.Storage.Blobs.Manager as a Cake Tool
#tool nuget:?package=Cloud.Azure.Storage.Blobs.Manager&version=8.0.0

Cloud.Azure.Storage.Blobs.Manager

Cloud.Azure.Storage.Blobs.Manager is an Injectable abstraction to download, upload, move, map, read and delete blobs from Azure.

It simplifies storage usage by allowing developers to inject it into the application and use it anywhere without having to worry about the azure client.

Available Methods


public Task UploadBlobAsync(string containerName, string containerDirectory, string blobName, MemoryStream stream);

public Task MoveBlobAsync(string containerName, string sourceContainerDirectory, string sourceBlobName, string destinationDirectory);

public Task<MemoryStream> DownloadBlobAsync(string containerName, string containerDirectory, string blobName);

public Task<string> DownloadBlobContentAsync(string containerName, string containerDirectory, string blobName);

public Task DeleteBlobAsync(string containerName, string containerDirectory, string blobName);

public Task<List<string>> ListFilesAsync(string containerName, string containerDirectory);
    

Usage

Injection

Just inject and use the ICache interface to store or obtain values from the cache like the example below:


public class SomeService
{
    private readonly IBlobStorageManager _storageManager;

    public SomeService(IBlobStorageManager storageManager)
    {
        _storageManager = storageManager;
    }    
}

Configuration

Startup/program

Just add below lines to have the IBlobStorageManager registered in the service collection and ready to use anywhere.

services.AddAzureBlobStorage(options =>
{
    options.WithEndpoint("<storage endpoint>");
});

Contributing

It is simple, as all things should be:

  1. Clone it
  2. Improve it
  3. Make pull request

Credits

  • Initial development by Slukad
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.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
8.0.0 220 11/17/2023
7.0.0 166 5/23/2023

Release