Allow file service to be used in plugins

This commit is contained in:
Kukks
2022-03-02 12:22:11 +01:00
parent 03e49ea2bf
commit 3231d5d179
5 changed files with 35 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.IO;
using System.Runtime.InteropServices.ComTypes;
using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Configuration;
using BTCPayServer.Storage.Services;
using BTCPayServer.Storage.Services.Providers;
@@ -23,6 +24,7 @@ namespace BTCPayServer.Storage
{
serviceCollection.AddSingleton<StoredFileRepository>();
serviceCollection.AddSingleton<FileService>();
serviceCollection.AddSingleton<IFileService>(provider => provider.GetRequiredService<FileService>());
// serviceCollection.AddSingleton<IStorageProviderService, AmazonS3FileProviderService>();
serviceCollection.AddSingleton<IStorageProviderService, AzureBlobStorageFileProviderService>();
serviceCollection.AddSingleton<IStorageProviderService, FileSystemFileProviderService>();