LiteX.Storage.Azure is a storage library which is based on LiteX.Storage.Core and Microsoft Azure API.
This client library enables working with the Microsoft Azure Storage (Blob) service for storing binary/blob data.
Small library to abstract storing files to Microsoft Azure. Quick setup for Azure Storage and very simple wrapper for the Azure Blob Storage to handle container instantiations.
Very simple configuration in advanced ways. Purpose of this package is to bring a new level of ease to the developers who deal with Azure Blob Storage integration with their system.
Install via Nuget.
PM> Install-Package LiteX.Storage.Azure
{
//LiteX Azure Storage settings
"AzureBlobConfig": {
"AzureBlobStorageConnectionString": "--- REPLACE WITH YOUR AZURE CONNECTION STRING ---",
"AzureBlobStorageContainerName": "--- REPLACE WITH YOUR AZURE CONTAINER NAME ---",
"AzureBlobStorageEndPoint": "--- REPLACE WITH YOUR AZURE END POINT ---",
"EnableLogging": true
}
}
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
// 1. Use default configuration from appsettings.json's 'AzureBlobConfig'
services.AddLiteXAzureBlobService();
//OR
// 2. Load configuration settings using options.
services.AddLiteXAzureBlobService(option =>
{
option.AzureBlobStorageConnectionString = "";
option.AzureBlobStorageContainerName = "";
option.AzureBlobStorageEndPoint = "";
option.EnableLogging = true;
});
//OR
// 3. Load configuration settings on your own.
// (e.g. appsettings, database, hardcoded)
var azureBlobConfig = new AzureBlobConfig()
{
AzureBlobStorageConnectionString = "",
AzureBlobStorageContainerName = "",
AzureBlobStorageEndPoint = "",
EnableLogging = true
};
services.AddLiteXAzureBlobService(azureBlobConfig);
// add logging (optional)
services.AddLiteXLogging();
}
}
Same for all providers.
For more helpful information about LiteX Storage, Please click here.