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
<PackageReference Include="Cloud.Azure.Storage.Blobs.Manager" Version="8.0.0" />
paket add Cloud.Azure.Storage.Blobs.Manager --version 8.0.0
#r "nuget: Cloud.Azure.Storage.Blobs.Manager, 8.0.0"
// 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:
- Clone it
- Improve it
- Make pull request
Credits
- Initial development by Slukad
Product | Versions 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- Azure.Storage.Blobs (>= 12.19.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Release