Pericia.Storage.OpenStack 4.1.0

.NET 6.0 .NET Standard 2.0
dotnet add package Pericia.Storage.OpenStack --version 4.1.0
NuGet\Install-Package Pericia.Storage.OpenStack -Version 4.1.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="Pericia.Storage.OpenStack" Version="4.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Pericia.Storage.OpenStack --version 4.1.0
#r "nuget: Pericia.Storage.OpenStack, 4.1.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 Pericia.Storage.OpenStack as a Cake Addin
#addin nuget:?package=Pericia.Storage.OpenStack&version=4.1.0

// Install Pericia.Storage.OpenStack as a Cake Tool
#tool nuget:?package=Pericia.Storage.OpenStack&version=4.1.0


Build status

Storage abstraction to store file in local file system or cloud storage.

Providers available for :

  • File system
  • MinIO
  • OpenStack
  • Azure Blobs
  • AWS S3
  • In-memory

How to use

The Pericia.Storage library provides an abstraction for cloud file storages. It is basically two interfaces :

  • IFileStorage : represents a file storage services, which contains containers (identified by name)
  • IFileStorageContainer : represents a container in the service, where the files will be stored.

IFileStorage contains the following method :

  • IFileStorageContainer GetContainer(string container); : get a container for the current storage service.

IFileStorageContainer contains the following methods :

  • Task<string> SaveFile(Stream fileData, string fileId) : Save a file to the storage service, using its unique identifier. If a file with the same id exists, it is overwritten.

  • Task<string> SaveFile(Stream fileData) : save a file to the storage service, and returns the generated unique id of the file.

  • Task<Stream> GetFile(string fileId) : get the file content from the service

  • Task DeleteFile(string fileId) : delete the file from the service


You can use the service using one of the providers (see below for details on each provider). First thing to do is to add the Nuget package for your provider.

Direct usage

Each provider has a constructor with a single parameter containing the options (specific for each provider).

FileSystemStorageOptions options = new FileSystemStorageOptions() { Path = @"C:\files\" };
var fileService = new FileSystemStorage(options);

var container1 = fileService.GetContainer("container1");

Or you can directly use the container class :

var container2 = new FileSystemStorageContainer(options, "container2");

Usage with IoC

The packages contains helpers to register the services in you aspnet core IoC. First, use AddStorage to register the storage service, then add your provider, with its configuration :

public void ConfigureServices(IServiceCollection services)
	var storageConfig = Configuration.GetSection("Storage");

If you want to be able to switch provider in your configuration, you can set the provider key in the Provider property of the options. Then you can add several providers, only the one in configuration will be registered :


If you only want to use one container in your app, you can register it directly :



File System


This provider saves the files on the hard drive.

The only option needed is Path, the directory path.

Provider key : FileSystem



Saves the files to MinIO or any S3-compatible service

The options needed are the AccessKey, SecretKey, and Endpoint (the url host, without the 'https://' part).

If your service endpoint is not accessible with https, you can add the option Insecure = true.

Some S3 services may throw an error "The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'xxx'". You can add the expected region to the options with key Region.

Provider key : MinIO



Saves to OpenStack. The following options are needed :

  • ApiEndpoint : the openstack api url
  • AuthEndpoint : the authentication url
  • TenantName
  • UserId
  • Password
  • AuthApiVersion : set this value to 2 if you want to use the v2 authentication API. If not set, the V3 API will be used.

Provider key : OpenStack

Azure blobs


Saves the files to Azure Blob storage.

The only option needed is the ConnectionString

Provider key : Azure



Saves the files to AWS S3

The options needed are the AccessKey, SecretKey, and either the RegionEndpoint (for AWS) or ServiceUrl (for S3-compatible providers)

If you use a S3-Compatible service, you should use the Minio provider instead

Provider key : AwsS3



Store data in-memory - for testing purpose.

Persist Data Protection keys


When Pericia.Storage is configured for your app, you can use it to save the data protection keys, with the package Pericia.Storage.AspNetCore.DataProtection.


You can use the default container, or you can choose to store the keys in a different container or in a sub-folder

    .PersistKeysToPericiaStorage(container: "keyscontainer", subDirectory: "keysdirectory")
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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)
Additional computed target framework(s)
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
4.1.0 67 9/14/2023
4.0.0 2,372 11/8/2022
4.0.0-preview3 85 10/29/2022
4.0.0-preview2 106 10/4/2022
4.0.0-preview1 104 10/3/2022
3.0.0 2,698 1/20/2022
3.0.0-rc2 154 12/11/2021
3.0.0-rc1 176 12/8/2021
2.2.1 565 12/6/2021
2.2.0 515 12/6/2021
2.2.0-preview4 265 3/18/2021
2.2.0-preview3 239 3/16/2021
2.2.0-preview2 241 3/16/2021
2.2.0-preview1 242 3/16/2021
2.1.0 2,712 2/27/2020
2.0.0 494 11/30/2019
1.3.2 572 10/31/2019
1.3.1 506 10/30/2019
1.3.0 586 9/28/2019
1.2.2 648 5/4/2019
1.2.1 734 1/13/2019
1.2.0 735 12/21/2018
1.1.0 733 10/24/2018
1.0.0 795 9/23/2018
0.1.1 829 8/28/2018
0.1.0 818 8/27/2018
0.0.1 874 8/18/2018