Samhammer.AzureBlobStorage
6.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Samhammer.AzureBlobStorage --version 6.0.0
NuGet\Install-Package Samhammer.AzureBlobStorage -Version 6.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="Samhammer.AzureBlobStorage" Version="6.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Samhammer.AzureBlobStorage --version 6.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Samhammer.AzureBlobStorage, 6.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 Samhammer.AzureBlobStorage as a Cake Addin #addin nuget:?package=Samhammer.AzureBlobStorage&version=6.0.0 // Install Samhammer.AzureBlobStorage as a Cake Tool #tool nuget:?package=Samhammer.AzureBlobStorage&version=6.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Samhammer.AzureBlobStorage
Usage
This package provides access to the azure blob storage over the azure sdk. It includes basic access functionality to upload and download files.
How to add this to your project:
- reference this package to your main project: https://www.nuget.org/packages/Samhammer.AzureBlobStorage/
- initialize the connection in Program.cs
- add the health check to Program.cs (optional)
- add the connection configuration to the appsettings (if the lib is initialized with IConfiguration in Program.cs)
Example Program.cs:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDefaultAzureBlobStorage(builder.Configuration);
builder.Services.AddHealthChecks()
.AddDefaultAzureBlobStorage()
Example appsettings configuration:
"AzureBlobStorageOptions": {
"ConnectionString": "DefaultEndpointsProtocol=https;AccountName=xxxxxx;AccountKey=xxxxxx;EndpointSuffix=core.windows.net"
},
Connect to multiple storages
The samples above are suitable if you only need one storage that is connected to your application. Having multiple storages is also supported by implementing multiple client factories.
public class MyClientFactory : IMyClientFactory
{
private IOptions<AzureBlobStorageOptions> Options { get; }
public MyClientFactory(IOptions<MyStorageOptions> options)
{
Options = options;
}
public BlobServiceClient GetClient()
{
return new BlobServiceClient(Options.Value.ConnectionString);
}
}
public interface IMyClientFactory : IAzureBlobStorageClientFactory
{
}
The client and a matching service is then registered like that:
var builder = WebApplication.CreateBuilder(args);
builder.services.AddSingleton<IMyClientFactory, MyClientFactory>();
builder.services.AddSingleton<IAzureBlobStorageService<IMyClientFactory>, AzureBlobStorageService<IMyClientFactory>>();
Contribute
How to publish package
- create git tag
- The nuget package will be published automatically by a github action
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- AspNetCore.HealthChecks.AzureStorage (>= 6.1.2)
- Azure.Storage.Blobs (>= 12.14.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 6.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 6.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 6.0.3)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 6.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.
Version | Downloads | Last updated |
---|---|---|
8.0.2 | 1,983 | 5/6/2024 |
8.0.1 | 1,454 | 4/11/2024 |
8.0.0 | 155 | 3/7/2024 |
6.1.8 | 275 | 5/6/2024 |
6.1.7 | 516 | 11/27/2023 |
6.1.6 | 166 | 11/27/2023 |
6.1.4 | 1,527 | 7/28/2023 |
6.1.3 | 180 | 7/27/2023 |
6.1.2 | 2,729 | 6/28/2023 |
6.1.1 | 151 | 6/26/2023 |
6.1.0 | 155 | 6/26/2023 |
6.0.3.4 | 165 | 6/23/2023 |
6.0.3.3 | 174 | 6/20/2023 |
6.0.3.2 | 180 | 6/19/2023 |
6.0.3.1 | 145 | 6/16/2023 |
6.0.3 | 671 | 3/14/2023 |
6.0.2 | 242 | 3/13/2023 |
6.0.1.1 | 173 | 6/16/2023 |
6.0.1 | 514 | 2/14/2023 |
6.0.0 | 249 | 2/9/2023 |