add filesystem for webroot

This commit is contained in:
2022-08-05 12:16:54 +02:00
parent 698f135a0f
commit 8d082667a0
3 changed files with 45 additions and 5 deletions
@@ -15,5 +15,11 @@ internal class ZeroFileStorageModule : ZeroModule
{
opts.ZeroAssetsPath = "zero";
});
services.AddSingleton<IWebRootFileSystem, WebRootFileSystem>(svc =>
{
IWebHostEnvironment env = svc.GetRequiredService<IWebHostEnvironment>();
return new(env.WebRootPath, null);
});
}
}