rename zero to Finch

This commit is contained in:
2026-04-07 14:23:29 +02:00
parent 535894e774
commit 1bcf2b25b5
267 changed files with 1028 additions and 1045 deletions
@@ -0,0 +1,25 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
namespace Finch.FileStorage;
internal class FinchFileStorageModule : FinchModule
{
public override void ConfigureServices(IServiceCollection services, IConfiguration configuration)
{
services.AddScoped<IPaths>(factory => new Paths(factory.GetService<IWebHostEnvironment>()));
services.AddOptions<FileSystemOptions>().Bind(configuration.GetSection("Finch:FileSystem")).Configure(opts =>
{
opts.FinchAssetsPath = "finch";
});
services.AddSingleton<IWebRootFileSystem, WebRootFileSystem>(svc =>
{
IWebHostEnvironment env = svc.GetRequiredService<IWebHostEnvironment>();
return new(env.WebRootPath, null);
});
}
}